subghz fix crash and wrong states

This commit is contained in:
MX
2024-07-28 19:46:35 +03:00
parent 09597ca898
commit 30c2676d60
2 changed files with 4 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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);
}