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

@ -51,12 +51,8 @@ class FProtoWeatherTX8300 : public FProtoWeatherBase {
if (!level) {
if (duration >= ((uint32_t)te_short * 5)) {
// Found syncPostfix
if ((decode_count_bit ==
min_count_bit_for_found) &&
ws_protocol_tx_8300_check_crc()) {
data = package_1;
data_count_bit = decode_count_bit;
ws_protocol_tx_8300_remote_controller();
if ((decode_count_bit == min_count_bit_for_found) && ws_protocol_tx_8300_check_crc()) {
decode_data = package_1;
if (callback) callback(this);
}
decode_data = 0;
@ -118,23 +114,6 @@ class FProtoWeatherTX8300 : public FProtoWeatherBase {
uint8_t crc = (~x & 0xF) << 4 | (~y & 0xF);
return (crc == (decode_data & 0xFF));
}
void ws_protocol_tx_8300_remote_controller() {
humidity = (((data >> 28) & 0x0F) * 10) + ((data >> 24) & 0x0F);
if (!((data >> 22) & 0x03))
battery_low = 0;
else
battery_low = 1;
channel = (data >> 20) & 0x03;
id = (data >> 12) & 0x7F;
float temp_raw = ((data >> 8) & 0x0F) * 10.0f + ((data >> 4) & 0x0F) +
(data & 0x0F) * 0.1f;
if (!((data >> 19) & 1)) {
temp = temp_raw;
} else {
temp = -temp_raw;
}
}
};
#endif