Increase sensitivity (#2309)

Increase sensitivity of Weather and SubghzD apps.
This commit is contained in:
Totoo 2024-10-17 10:22:01 +02:00 committed by GitHub
parent cc7123b28d
commit cb3774ad81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 486 additions and 38 deletions

View file

@ -213,6 +213,11 @@ const char* WeatherView::getWeatherSensorTypeName(FPROTO_WEATHER_SENSOR type) {
return "EmosE601x";
case FPW_SolightTE44:
return "SolightTE44";
case FPW_Bresser3CH:
case FPW_Bresser3CH_V1:
return "Bresser3CH";
case FPW_Vauno_EN8822:
return "Vauno EN8822";
case FPW_Invalid:
default:
return "Unknown";
@ -532,6 +537,42 @@ WeatherRecentEntry WeatherView::process_data(const WeatherDataMessage* data) {
i16 |= 0xf000;
}
ret.temp = (float)i16 / 10.0;
break;
case FPW_Bresser3CH:
ret.id = (data->decode_data >> 28) & 0xff;
ret.channel = ((data->decode_data >> 27) & 0x01) | (((data->decode_data >> 26) & 0x01) << 1);
// ret.btn = ((data->decode_data >> 25) & 0x1);
ret.battery_low = ((data->decode_data >> 24) & 0x1);
i16 = (data->decode_data >> 12) & 0x0fff;
/* Handle signed data */
if (i16 & 0x0800) {
i16 |= 0xf000;
}
ret.temp = (float)i16 / 10.0;
ret.humidity = data->decode_data & 0xff;
break;
case FPW_Bresser3CH_V1:
ret.id = (data->decode_data >> 32) & 0xff;
ret.battery_low = ((data->decode_data >> 31) & 0x1);
// ret.btn = (data->decode_data >> 30) & 0x1;
ret.channel = (data->decode_data >> 28) & 0x3;
ret.temp = (data->decode_data >> 16) & 0xfff;
ret.temp = FProtoGeneral::locale_fahrenheit_to_celsius((float)(ret.temp - 900) / 10.0);
ret.humidity = (data->decode_data >> 8) & 0xff;
break;
case FPW_Vauno_EN8822:
ret.id = (data->decode_data >> 34) & 0xff;
ret.battery_low = (data->decode_data >> 33) & 0x01;
ret.channel = ((data->decode_data >> 30) & 0x03);
i16 = (data->decode_data >> 18) & 0x0fff;
/* Handle signed data */
if (i16 & 0x0800) {
i16 |= 0xf000;
}
ret.temp = (float)i16 / 10.0;
ret.humidity = (data->decode_data >> 11) & 0x7f;
break;
case FPW_Invalid:
default: