SubghzD & Weather improvments (#2237)

* Weather restructure

* Added Solight TE44 protocol

* Add disabled Marantec24, and GangQi

* More opt in subghzd
This commit is contained in:
Totoo 2024-09-06 20:23:11 +02:00 committed by GitHub
parent 76763b9bab
commit e6afd7744d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 687 additions and 512 deletions

View file

@ -42,9 +42,6 @@ class FProtoWeatherAmbient : public FProtoWeatherBase {
if (((decode_data & AMBIENT_WEATHER_PACKET_HEADER_MASK) == AMBIENT_WEATHER_PACKET_HEADER_1) ||
((decode_data & AMBIENT_WEATHER_PACKET_HEADER_MASK) == AMBIENT_WEATHER_PACKET_HEADER_2)) {
if (ws_protocol_ambient_weather_check_crc()) {
data = decode_data;
data_count_bit = min_count_bit_for_found;
ws_protocol_ambient_weather_remote_controller();
if (callback) callback(this);
decode_data = 0;
decode_count_bit = 0;
@ -74,14 +71,6 @@ class FProtoWeatherAmbient : public FProtoWeatherBase {
uint8_t crc = FProtoGeneral::subghz_protocol_blocks_lfsr_digest8(msg, 5, 0x98, 0x3e) ^ 0x64;
return (crc == (uint8_t)(decode_data & 0xFF));
}
void ws_protocol_ambient_weather_remote_controller() {
id = (data >> 32) & 0xFF;
battery_low = (data >> 31) & 1;
channel = ((data >> 28) & 0x07) + 1;
temp = FProtoGeneral::locale_fahrenheit_to_celsius(((float)((data >> 16) & 0x0FFF) - 400.0f) / 10.0f);
humidity = (data >> 8) & 0xFF;
}
};
#endif