mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGhz: refactoring
This commit is contained in:
@@ -57,15 +57,16 @@ void subghz_scene_save_name_on_enter(void* context) {
|
||||
if(!subghz_path_is_file(subghz->file_path)) {
|
||||
char file_name_buf[SUBGHZ_MAX_LEN_NAME] = {0};
|
||||
if(furi_hal_subghz_get_timestamp_file_names()) {
|
||||
if(subghz->txrx->decoder_result != 0x0) {
|
||||
if(subghz->txrx->decoder_result != NULL) {
|
||||
if(strlen(subghz->txrx->decoder_result->protocol->name) != 0) {
|
||||
SubGhzProtocolDecoderBase* decoder_result = subghz_txrx_get_decoder(subghz->txrx);
|
||||
if(decoder_result != 0x0) {
|
||||
if(decoder_result != NULL) {
|
||||
if(strlen(decoder_result->protocol->name) != 0) {
|
||||
if(scene_manager_has_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneSetType)) {
|
||||
subghz_scene_save_name_get_timefilename(file_name, "S", true);
|
||||
} else {
|
||||
subghz_scene_save_name_get_timefilename(
|
||||
file_name, subghz->txrx->decoder_result->protocol->name, false);
|
||||
file_name, decoder_result->protocol->name, false);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -155,8 +156,7 @@ bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) {
|
||||
} else {
|
||||
subghz_save_protocol_to_file(
|
||||
subghz,
|
||||
subghz_history_get_raw_data(
|
||||
subghz->history, subghz->idx_menu_chosen),
|
||||
subghz_history_get_raw_data(subghz->history, subghz->idx_menu_chosen),
|
||||
furi_string_get_cstr(subghz->file_path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user