mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-11-01 14:22:12 +01:00
Merge pull request #54 from cjkas/fix/restore-skip-rooms
fix: skip the room records too when a restore leaves the shades out
This commit is contained in:
commit
2b2a4f815d
4 changed files with 91 additions and 20 deletions
|
|
@ -574,10 +574,8 @@ bool ShadeConfigFile::restoreFile(SomfyShadeController *s, const char *filename,
|
|||
}
|
||||
else {
|
||||
ESP_LOGI(TAG, "Shade data ignored");
|
||||
// FF past the shades and groups.
|
||||
this->file.seek(this->file.position()
|
||||
+ (this->header.shadeRecords * this->header.shadeRecordSize)
|
||||
+ (this->header.groupRecords * this->header.groupRecordSize), SeekSet); // Start at the beginning of the file after the header.
|
||||
// FF past the rooms, shades and groups.
|
||||
this->file.seek(this->file.position() + shadeModelBytes(this->header), SeekSet);
|
||||
}
|
||||
if(opts.repeaters) {
|
||||
ESP_LOGI(TAG, "Restoring Repeaters...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue