mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
Damn i missed this one (C/F Weather conv) --nobuild
This commit is contained in:
@@ -306,12 +306,13 @@ SubGhzProtocolStatus
|
||||
void ws_protocol_decoder_oregon_v1_get_string(void* context, FuriString* output) {
|
||||
furi_assert(context);
|
||||
WSProtocolDecoderOregon_V1* instance = context;
|
||||
bool locale_is_metric = furi_hal_rtc_get_locale_units() == FuriHalRtcLocaleUnitsMetric;
|
||||
furi_string_cat_printf(
|
||||
output,
|
||||
"%s\r\n%dbit\r\n"
|
||||
"Key:0x%lX%08lX\r\n"
|
||||
"Sn:0x%lX Ch:%d Bat:%d\r\n"
|
||||
"Temp:%3.1f C Hum:%d%%",
|
||||
"Temp:%3.1f %c Hum:%d%%",
|
||||
instance->generic.protocol_name,
|
||||
instance->generic.data_count_bit,
|
||||
(uint32_t)(instance->generic.data >> 32),
|
||||
@@ -319,6 +320,8 @@ void ws_protocol_decoder_oregon_v1_get_string(void* context, FuriString* output)
|
||||
instance->generic.id,
|
||||
instance->generic.channel,
|
||||
instance->generic.battery_low,
|
||||
(double)instance->generic.temp,
|
||||
(double)(locale_is_metric ? instance->generic.temp :
|
||||
locale_celsius_to_fahrenheit(instance->generic.temp)),
|
||||
locale_is_metric ? 'C' : 'F',
|
||||
instance->generic.humidity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user