Sub-GHz: Show satellites count with an icon (#215)

* feat(subghz): show satellites if enabled

Replaces the display of the number of satellites during SubGHz scanning. If GPS is enabled (an an external module connected) it will blink a GPS icon with the number of sats currently in range (even if zero).
Using a 10x10px "positioning" icon that replaces the SubGHz icon on the bottom right.

* Revert api version to ofw release

* f18 too

* Tweak icon a little

* Update changelog

* Format

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
m7i-org
2024-09-17 19:43:30 -04:00
committed by GitHub
parent 3351f9b636
commit df273950cc
9 changed files with 42 additions and 21 deletions

View File

@@ -50,11 +50,13 @@ const NotificationSequence subghz_sequence_tx_beep = {
static void subghz_scene_receiver_update_statusbar(void* context) {
SubGhz* subghz = context;
FuriString* history_stat_str = furi_string_alloc();
bool show_sats = subghz->gps && furi_hal_rtc_get_timestamp() % 2;
if(!subghz_history_get_text_space_left(
subghz->history,
history_stat_str,
subghz->gps ? subghz->gps->satellites : 0,
subghz->last_settings->delete_old_signals)) {
subghz->last_settings->delete_old_signals,
show_sats,
show_sats ? subghz->gps->satellites : 0)) {
FuriString* frequency_str = furi_string_alloc();
FuriString* modulation_str = furi_string_alloc();
@@ -87,6 +89,7 @@ static void subghz_scene_receiver_update_statusbar(void* context) {
furi_string_get_cstr(history_stat_str),
subghz_txrx_hopper_get_state(subghz->txrx) != SubGhzHopperStateOFF,
READ_BIT(subghz->filter, SubGhzProtocolFlag_BinRAW) > 0,
show_sats,
subghz->repeater);
furi_string_free(frequency_str);
@@ -99,6 +102,7 @@ static void subghz_scene_receiver_update_statusbar(void* context) {
"",
subghz_txrx_hopper_get_state(subghz->txrx) != SubGhzHopperStateOFF,
READ_BIT(subghz->filter, SubGhzProtocolFlag_BinRAW) > 0,
show_sats,
subghz->repeater);
}
furi_string_free(history_stat_str);