mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
fix: skip the room records too when a restore leaves the shades out
A restore without "shades" skipped the shade and group records but not the room records, which come first, so it read the repeaters and the settings from room data. The skip is now shadeModelBytes(), in a ConfigHeader.h the native tests can reach, which counts rooms, shades and groups. Found during LOOP_QUEUE_PLAN.md's review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bee6a6d60b
commit
50aa491437
4 changed files with 91 additions and 20 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <LittleFS.h>
|
||||
#include "Somfy.h"
|
||||
#include "ConfigSettings.h"
|
||||
#include "ConfigHeader.h"
|
||||
|
||||
#ifndef configfile_h
|
||||
#define configfile_h
|
||||
|
|
@ -12,22 +13,6 @@
|
|||
#define CFG_TOK_QUOTE '"'
|
||||
|
||||
|
||||
struct config_header_t {
|
||||
uint8_t version = 1;
|
||||
uint8_t repeaterRecords = 0;
|
||||
uint8_t repeaterRecordSize = 0;
|
||||
uint8_t roomRecords = 0;
|
||||
uint16_t roomRecordSize = 0;
|
||||
uint16_t shadeRecordSize = 0;
|
||||
uint8_t shadeRecords = 0;
|
||||
uint16_t groupRecordSize = 0;
|
||||
uint8_t groupRecords = 0;
|
||||
uint16_t settingsRecordSize = 0;
|
||||
uint16_t netRecordSize = 0;
|
||||
uint16_t transRecordSize = 0;
|
||||
char serverId[10] = ""; // This must match the server id size in the ConfigSettings.
|
||||
int8_t length = 0;
|
||||
};
|
||||
class ConfigFile {
|
||||
protected:
|
||||
File file;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue