mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Somfy: add SunFlag auto movement logic
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
1be1fe4fba
commit
e55d7a4205
1 changed files with 9 additions and 0 deletions
|
|
@ -1112,6 +1112,15 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
||||||
break;
|
break;
|
||||||
case somfy_commands::SunFlag:
|
case somfy_commands::SunFlag:
|
||||||
this->flags |= static_cast<uint8_t>(somfy_flags_t::SunFlag);
|
this->flags |= static_cast<uint8_t>(somfy_flags_t::SunFlag);
|
||||||
|
|
||||||
|
if (!(this->flags & static_cast<uint8_t>(somfy_flags_t::Windy)))
|
||||||
|
{
|
||||||
|
if (this->flags & static_cast<uint8_t>(somfy_flags_t::Sunny))
|
||||||
|
this->target = 100.0f;
|
||||||
|
else
|
||||||
|
this->target = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
this->emitState();
|
this->emitState();
|
||||||
break;
|
break;
|
||||||
case somfy_commands::Up:
|
case somfy_commands::Up:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue