From aebde09f027301a5d216971eec07e9d90735fa63 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:13:03 +0200 Subject: [PATCH] SubGHz: Show Weather Station icon for WS signals --- CHANGELOG.md | 1 + applications/main/subghz/subghz_history.c | 5 +++++ applications/main/subghz/views/receiver.c | 1 + assets/icons/SubGhz/Weather_7x8.png | Bin 0 -> 81 bytes targets/f7/api_symbols.csv | 1 + 5 files changed, 8 insertions(+) create mode 100644 assets/icons/SubGhz/Weather_7x8.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ee103610..25f009470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Authenticator: Confirm token export on Flipper (by @akopachov) - NFC Playlist: Allow delay up to 12s (by @xtruan) - BLE Spam: Fix delay help section (by @Willy-JL) +- Sub-GHz: Show Weather Station icon for WS signals (by @Willy-JL) - API: Publishing T5577 page 1 block count macro (by @zinongli) ### Fixed: diff --git a/applications/main/subghz/subghz_history.c b/applications/main/subghz/subghz_history.c index acf6d3941..ccc6e3ecb 100644 --- a/applications/main/subghz/subghz_history.c +++ b/applications/main/subghz/subghz_history.c @@ -269,6 +269,11 @@ bool subghz_history_add_to_history( SubGhzHistoryItem* item = SubGhzHistoryItemArray_push_raw(instance->history->data); item->preset = malloc(sizeof(SubGhzRadioPreset)); item->type = decoder_base->protocol->type; + if(decoder_base->protocol->filter & SubGhzProtocolFilter_Weather) { + // Other code uses protocol type to check if signal is usable + // so we can't change the actual protocol type, we fake it here + item->type = SubGhzProtocolWeatherStation; + } item->preset->frequency = preset->frequency; item->preset->name = furi_string_alloc(); furi_string_set(item->preset->name, preset->name); diff --git a/applications/main/subghz/views/receiver.c b/applications/main/subghz/views/receiver.c index b697e626f..232ff9be4 100644 --- a/applications/main/subghz/views/receiver.c +++ b/applications/main/subghz/views/receiver.c @@ -38,6 +38,7 @@ static const Icon* ReceiverItemIcons[] = { [SubGhzProtocolTypeUnknown] = &I_Quest_7x8, [SubGhzProtocolTypeStatic] = &I_Static_9x7, [SubGhzProtocolTypeDynamic] = &I_Dynamic_9x7, + [SubGhzProtocolWeatherStation] = &I_Weather_7x8, [SubGhzProtocolTypeBinRAW] = &I_Raw_9x7, }; diff --git a/assets/icons/SubGhz/Weather_7x8.png b/assets/icons/SubGhz/Weather_7x8.png new file mode 100644 index 0000000000000000000000000000000000000000..4b9c0127e89ed380e9df64f74e4974193b01a03c GIT binary patch literal 81 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H2qYL}>u;k&w;r>mdKI;Vst0OHveM*si- literal 0 HcmV?d00001 diff --git a/targets/f7/api_symbols.csv b/targets/f7/api_symbols.csv index a6b84bb76..ba401bcda 100644 --- a/targets/f7/api_symbols.csv +++ b/targets/f7/api_symbols.csv @@ -3988,6 +3988,7 @@ Variable,+,I_Volup_8x6,const Icon, Variable,+,I_WarningDolphinFlip_45x42,const Icon, Variable,+,I_WarningDolphin_45x42,const Icon, Variable,+,I_Warning_30x23,const Icon, +Variable,+,I_Weather_7x8,const Icon, Variable,+,I_arrow_nano_down,const Icon, Variable,+,I_arrow_nano_up,const Icon, Variable,+,I_back_10px,const Icon,