mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 15:12:35 -04:00
SubghzD & Weather improvments (#2237)
* Weather restructure * Added Solight TE44 protocol * Add disabled Marantec24, and GangQi * More opt in subghzd
This commit is contained in:
parent
76763b9bab
commit
e6afd7744d
75 changed files with 687 additions and 512 deletions
|
@ -51,9 +51,6 @@ class FProtoWeatherNexusTH : public FProtoWeatherBase {
|
|||
parser_step = Nexus_THDecoderStepReset;
|
||||
if ((decode_count_bit == min_count_bit_for_found) &&
|
||||
ws_protocol_nexus_th_check()) {
|
||||
data = decode_data;
|
||||
data_count_bit = decode_count_bit;
|
||||
ws_protocol_nexus_th_remote_controller();
|
||||
if (callback) callback((FProtoWeatherBase*)this);
|
||||
parser_step = Nexus_THDecoderStepCheckDuration;
|
||||
}
|
||||
|
@ -98,23 +95,6 @@ class FProtoWeatherNexusTH : public FProtoWeatherBase {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// fill the base class's variables before calling the callback
|
||||
void ws_protocol_nexus_th_remote_controller() {
|
||||
id = (data >> 28) & 0xFF;
|
||||
battery_low = !((data >> 27) & 1);
|
||||
channel = ((data >> 24) & 0x03) + 1;
|
||||
if (!((data >> 23) & 1)) {
|
||||
temp = (float)((data >> 12) & 0x07FF) / 10.0f;
|
||||
} else {
|
||||
temp = (float)((~(data >> 12) & 0x07FF) + 1) / -10.0f;
|
||||
}
|
||||
humidity = data & 0xFF;
|
||||
if (humidity > 95)
|
||||
humidity = 95;
|
||||
else if (humidity < 20)
|
||||
humidity = 20;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue