mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Somfy: commit flags when they change
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
dbff287437
commit
ac4fcab029
2 changed files with 3 additions and 1 deletions
|
|
@ -360,7 +360,7 @@ bool ShadeConfigFile::writeShadeRecord(SomfyShade *shade) {
|
|||
this->writeUInt32(rem->getRemoteAddress());
|
||||
}
|
||||
this->writeUInt16(shade->lastRollingCode);
|
||||
this->writeUInt8(shade->flags);
|
||||
this->writeUInt8(shade->flags & static_cast<uint8_t>(somfy_flags_t::SunFlag));
|
||||
this->writeFloat(shade->myPos, 5);
|
||||
this->writeFloat(shade->myTiltPos, 5);
|
||||
this->writeFloat(shade->currentPos, 5);
|
||||
|
|
|
|||
|
|
@ -1215,6 +1215,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
|
||||
case somfy_commands::Flag:
|
||||
this->flags &= ~(static_cast<uint8_t>(somfy_flags_t::SunFlag));
|
||||
somfy.isDirty = true;
|
||||
this->emitState();
|
||||
break;
|
||||
case somfy_commands::SunFlag:
|
||||
|
|
@ -1233,6 +1234,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
this->target = 0.0f;
|
||||
}
|
||||
|
||||
somfy.isDirty = true;
|
||||
this->emitState();
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue