mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Add Demo Mode flags for Sun/Wind sensor
This commit is contained in:
parent
2ecc0de36e
commit
60f8c629bf
3 changed files with 6 additions and 0 deletions
|
|
@ -1162,6 +1162,11 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
||||||
this->flags |= static_cast<uint8_t>(somfy_flags_t::Windy);
|
this->flags |= static_cast<uint8_t>(somfy_flags_t::Windy);
|
||||||
else
|
else
|
||||||
this->flags &= ~(static_cast<uint8_t>(somfy_flags_t::Windy));
|
this->flags &= ~(static_cast<uint8_t>(somfy_flags_t::Windy));
|
||||||
|
if(frame.rollingCode & static_cast<uint8_t>(somfy_flags_t::DemoMode))
|
||||||
|
this->flags |= static_cast<uint8_t>(somfy_flags_t::DemoMode);
|
||||||
|
else
|
||||||
|
this->flags &= ~(static_cast<uint8_t>(somfy_flags_t::DemoMode));
|
||||||
|
|
||||||
|
|
||||||
const bool isSunny = this->flags & static_cast<uint8_t>(somfy_flags_t::Sunny);
|
const bool isSunny = this->flags & static_cast<uint8_t>(somfy_flags_t::Sunny);
|
||||||
const bool isWindy = this->flags & static_cast<uint8_t>(somfy_flags_t::Windy);
|
const bool isWindy = this->flags & static_cast<uint8_t>(somfy_flags_t::Windy);
|
||||||
|
|
|
||||||
1
Somfy.h
1
Somfy.h
|
|
@ -107,6 +107,7 @@ struct somfy_tx_queue_t {
|
||||||
|
|
||||||
enum class somfy_flags_t : byte {
|
enum class somfy_flags_t : byte {
|
||||||
SunFlag = 0x01,
|
SunFlag = 0x01,
|
||||||
|
DemoMode = 0x04,
|
||||||
Windy = 0x10,
|
Windy = 0x10,
|
||||||
Sunny = 0x20
|
Sunny = 0x20
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue