Somfy: commit flags when they change

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2023-06-03 11:31:04 +02:00
parent dbff287437
commit ac4fcab029
2 changed files with 3 additions and 1 deletions

View file

@ -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);