Skip to content

Commit

Permalink
subghz fix crash and wrong states
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Jul 28, 2024
1 parent 09597ca commit 30c2676
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ bool subghz_scene_frequency_analyzer_on_event(void* context, SceneManagerEvent e

return true;
} else if(event.event == SubGhzCustomEventViewFreqAnalOkLong) {
// Don't need to save, we already saved on short event
//scene_manager_set_scene_state(subghz->scene_manager, SubGhzSceneStart, 10);
// Don't need to save, we already saved on short event (and on exit event too)
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateIDLE);
scene_manager_set_scene_state(subghz->scene_manager, SubGhzSceneStart, 10);
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiver);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion applications/main/subghz/scenes/subghz_scene_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ static void subghz_scene_add_to_history_callback(
if(subghz_history_get_text_space_left(subghz->history, NULL)) {
notification_message(subghz->notifications, &sequence_error);
}
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey);
}
subghz_receiver_reset(receiver);
furi_string_free(item_name);
furi_string_free(item_time);
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey);
} else {
FURI_LOG_D(TAG, "%s protocol ignored", decoder_base->protocol->name);
}
Expand Down

0 comments on commit 30c2676

Please sign in to comment.