mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2025-02-17 05:48:33 +00:00
Merge pull request #464 from wosk/fix/subghz-notifies
SubGHz: Notifications refines
This commit is contained in:
commit
c97412f9bd
2 changed files with 15 additions and 4 deletions
|
@ -113,6 +113,9 @@ static void subghz_scene_add_to_history_callback(
|
|||
subghz_history_get_type_protocol(history, idx));
|
||||
|
||||
subghz_scene_receiver_update_statusbar(subghz);
|
||||
if(subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
notification_message(subghz->notifications, &sequence_error);
|
||||
}
|
||||
}
|
||||
subghz_receiver_reset(receiver);
|
||||
furi_string_free(item_name);
|
||||
|
@ -131,6 +134,7 @@ void subghz_scene_receiver_on_enter(void* context) {
|
|||
subghz_txrx_set_preset(subghz->txrx, "AM650", subghz->last_settings->frequency, NULL, 0);
|
||||
subghz_history_reset(history);
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateStart);
|
||||
subghz->idx_menu_chosen = 0;
|
||||
}
|
||||
|
||||
subghz_view_receiver_set_lock(subghz->subghz_receiver, subghz_is_locked(subghz));
|
||||
|
@ -183,7 +187,9 @@ void subghz_scene_receiver_on_enter(void* context) {
|
|||
}
|
||||
}
|
||||
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
if(!subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
}
|
||||
subghz_txrx_rx_start(subghz->txrx);
|
||||
subghz_view_receiver_set_idx_menu(subghz->subghz_receiver, subghz->idx_menu_chosen);
|
||||
|
||||
|
@ -204,7 +210,6 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
|||
subghz->state_notifications = SubGhzNotificationStateIDLE;
|
||||
subghz_txrx_stop(subghz->txrx);
|
||||
subghz_txrx_hopper_set_state(subghz->txrx, SubGhzHopperStateOFF);
|
||||
subghz->idx_menu_chosen = 0;
|
||||
subghz_txrx_set_rx_calback(subghz->txrx, NULL, subghz);
|
||||
|
||||
if(subghz_rx_key_state_get(subghz) == SubGhzRxKeyStateAddKey) {
|
||||
|
@ -244,7 +249,7 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
|||
consumed = true;
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverConfig:
|
||||
subghz->state_notifications = SubGhzNotificationStateIDLE;
|
||||
// Actually signals are received but SubGhzNotificationStateRx is not working inside Config Scene
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzViewIdReceiver, SubGhzCustomEventManagerSet);
|
||||
|
|
|
@ -109,6 +109,10 @@ void subghz_scene_receiver_info_on_enter(void* context) {
|
|||
subghz_custom_btns_reset();
|
||||
|
||||
subghz_scene_receiver_info_draw_widget(subghz);
|
||||
|
||||
if(!subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
}
|
||||
}
|
||||
|
||||
bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) {
|
||||
|
@ -142,7 +146,9 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||
subghz_txrx_rx_start(subghz->txrx);
|
||||
|
||||
subghz_txrx_hopper_unpause(subghz->txrx);
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
if(!subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if(event.event == SubGhzCustomEventSceneReceiverInfoSave) {
|
||||
|
|
Loading…
Add table
Reference in a new issue