Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Damn i missed this one (C/F Weather conv) --nobuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Feb 24, 2024
1 parent 662d9d7 commit ea68a30
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/subghz/protocols/oregon_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,19 +306,22 @@ 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),
(uint32_t)(instance->generic.data),
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);
}

0 comments on commit ea68a30

Please sign in to comment.