mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Also do C/F conversion for other WS protos
Co-authored-by: Connor Quick <72400253+cquick01@users.noreply.github.com>
This commit is contained in:
@@ -313,12 +313,13 @@ SubGhzProtocolStatus
|
||||
void ws_protocol_decoder_nexus_th_get_string(void* context, FuriString* output) {
|
||||
furi_assert(context);
|
||||
WSProtocolDecoderNexus_TH* 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),
|
||||
@@ -326,7 +327,9 @@ void ws_protocol_decoder_nexus_th_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