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

@ -81,9 +81,7 @@ class FProtoWeatherEmosE601x : public FProtoWeatherBase {
}
if (decode_count_bit == 120) {
data_count_bit = decode_count_bit;
if (ws_protocol_emose601x_check()) {
ws_protocol_emose601x_extract_data();
if (callback) callback(this);
}
break;
@ -127,20 +125,6 @@ class FProtoWeatherEmosE601x : public FProtoWeatherBase {
uint8_t sum = FProtoGeneral::subghz_protocol_blocks_add_bytes(msg, 13);
return (sum == ((decode_data >> 8) & 0xff));
}
void ws_protocol_emose601x_extract_data() {
id = (upper_decode_data >> 24) & 0xff;
battery_low = (decode_data >> 10) & 1;
int16_t temp = (decode_data >> 40) & 0xfff;
/* Handle signed data */
if (temp & 0x800) {
temp |= 0xf000;
}
temp = (float)temp / 10.0;
humidity = (decode_data >> 32) & 0xff;
channel = (decode_data >> 52) & 0x03;
data = (decode_data >> 16);
}
};
#endif