mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Ignore Flag/SunFlag frames from sensors #147
This commit is contained in:
parent
a823d2349a
commit
93656f9478
2 changed files with 2 additions and 0 deletions
|
|
@ -1563,6 +1563,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
case somfy_commands::Flag:
|
||||
this->lastFrame.processed = true;
|
||||
if(this->shadeType == shade_types::drycontact) return;
|
||||
if(this->lastFrame.rollingCode & 0x8000) return; // Some sensors send bogus frames with a rollingCode >= 32768 that cause them to change the state.
|
||||
this->flags &= ~(static_cast<uint8_t>(somfy_flags_t::SunFlag));
|
||||
somfy.isDirty = true;
|
||||
this->emitState();
|
||||
|
|
@ -1571,6 +1572,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
break;
|
||||
case somfy_commands::SunFlag:
|
||||
if(this->shadeType == shade_types::drycontact) return;
|
||||
if(this->lastFrame.rollingCode & 0x8000) return; // Some sensors send bogus frames with a rollingCode >= 32768 that cause them to change the state.
|
||||
{
|
||||
const bool isWindy = this->flags & static_cast<uint8_t>(somfy_flags_t::Windy);
|
||||
this->flags |= static_cast<uint8_t>(somfy_flags_t::SunFlag);
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue