mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 10:58:06 +00: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:
@@ -102,9 +102,6 @@ class FProtoWeatherOregonV1 : public FProtoWeatherBase {
|
||||
decode_data = ~decode_data | (1 << 31);
|
||||
}
|
||||
if (ws_protocol_oregon_v1_check()) {
|
||||
data = decode_data;
|
||||
data_count_bit = decode_count_bit;
|
||||
ws_protocol_oregon_v1_remote_controller();
|
||||
if (callback) callback(this);
|
||||
}
|
||||
}
|
||||
@@ -145,22 +142,6 @@ class FProtoWeatherOregonV1 : public FProtoWeatherBase {
|
||||
crc = (crc & 0xff) + ((crc >> 8) & 0xff);
|
||||
return (crc == ((data >> 24) & 0xFF));
|
||||
}
|
||||
void ws_protocol_oregon_v1_remote_controller() {
|
||||
uint64_t data2 = FProtoGeneral::subghz_protocol_blocks_reverse_key(data, 32);
|
||||
|
||||
id = data2 & 0xFF;
|
||||
channel = ((data2 >> 6) & 0x03) + 1;
|
||||
|
||||
float temp_raw =
|
||||
((data2 >> 8) & 0x0F) * 0.1f + ((data2 >> 12) & 0x0F) + ((data2 >> 16) & 0x0F) * 10.0f;
|
||||
if (!((data2 >> 21) & 1)) {
|
||||
temp = temp_raw;
|
||||
} else {
|
||||
temp = -temp_raw;
|
||||
}
|
||||
battery_low = !((data2 >> 23) & 1ULL);
|
||||
humidity = WS_NO_HUMIDITY;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user