mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
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:
@@ -7,11 +7,13 @@
|
||||
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();
|
||||
|
||||
@@ -25,6 +27,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);
|
||||
@@ -37,6 +40,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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user