diff --git a/applications/main/lfrfid/scenes/lfrfid_scene_save_name.c b/applications/main/lfrfid/scenes/lfrfid_scene_save_name.c index 70c47e8a43..2f223ae87f 100644 --- a/applications/main/lfrfid/scenes/lfrfid_scene_save_name.c +++ b/applications/main/lfrfid/scenes/lfrfid_scene_save_name.c @@ -36,7 +36,7 @@ void lfrfid_scene_save_name_on_enter(void* context) { LFRFID_TEXT_STORE_SIZE, key_name_is_empty); - FURI_LOG_I("", "%s %s", furi_string_get_cstr(folder_path), app->text_store); + FURI_LOG_D("", "%s %s", furi_string_get_cstr(folder_path), app->text_store); ValidatorIsFile* validator_is_file = validator_is_file_alloc_init( furi_string_get_cstr(folder_path), diff --git a/applications/main/nfc/plugins/supported_cards/all_in_one.c b/applications/main/nfc/plugins/supported_cards/all_in_one.c index 9e20b92d1f..f85d7ad2e8 100644 --- a/applications/main/nfc/plugins/supported_cards/all_in_one.c +++ b/applications/main/nfc/plugins/supported_cards/all_in_one.c @@ -20,8 +20,8 @@ static AllInOneLayoutType all_in_one_get_layout(const MfUltralightData* data) { const uint8_t layout_byte = data->page[5].data[2]; const uint8_t layout_half_byte = data->page[5].data[2] & 0x0F; - FURI_LOG_I(TAG, "Layout byte: %02x", layout_byte); - FURI_LOG_I(TAG, "Layout half-byte: %02x", layout_half_byte); + FURI_LOG_D(TAG, "Layout byte: %02x", layout_byte); + FURI_LOG_D(TAG, "Layout half-byte: %02x", layout_half_byte); switch(layout_half_byte) { // If it is A, the layout type is a type A layout @@ -32,7 +32,7 @@ static AllInOneLayoutType all_in_one_get_layout(const MfUltralightData* data) { case 0x02: return AllInOneLayoutType2; default: - FURI_LOG_I(TAG, "Unknown layout type: %d", layout_half_byte); + FURI_LOG_E(TAG, "Unknown layout type: %d", layout_half_byte); return AllInOneLayoutTypeUnknown; } } @@ -47,7 +47,7 @@ static bool all_in_one_parse(const NfcDevice* device, FuriString* parsed_data) { do { if(data->page[4].data[0] != 0x45 || data->page[4].data[1] != 0xD9) { - FURI_LOG_I(TAG, "Pass not verified"); + FURI_LOG_E(TAG, "Pass not verified"); break; } @@ -63,7 +63,7 @@ static bool all_in_one_parse(const NfcDevice* device, FuriString* parsed_data) { // If the layout is D, the ride count is stored in the second byte of page 9 ride_count = data->page[9].data[1]; } else { - FURI_LOG_I(TAG, "Unknown layout: %d", layout_type); + FURI_LOG_E(TAG, "Unknown layout: %d", layout_type); ride_count = 137; } diff --git a/applications/main/nfc/plugins/supported_cards/social_moscow.c b/applications/main/nfc/plugins/supported_cards/social_moscow.c index 6123c00292..3e97d0a9a7 100644 --- a/applications/main/nfc/plugins/supported_cards/social_moscow.c +++ b/applications/main/nfc/plugins/supported_cards/social_moscow.c @@ -82,7 +82,7 @@ void from_minutes_to_datetime(uint32_t minutes, DateTime* datetime, uint16_t sta bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { uint16_t transport_departament = bit_lib_get_bits_16(block->data, 0, 10); - FURI_LOG_I(TAG, "Transport departament: %x", transport_departament); + FURI_LOG_D(TAG, "Transport departament: %x", transport_departament); uint16_t layout_type = bit_lib_get_bits_16(block->data, 52, 4); if(layout_type == 0xE) { @@ -91,7 +91,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { layout_type = bit_lib_get_bits_16(block->data, 52, 14); } - FURI_LOG_I(TAG, "Layout type %x", layout_type); + FURI_LOG_D(TAG, "Layout type %x", layout_type); uint16_t card_view = 0; uint16_t card_type = 0; diff --git a/applications/main/subghz/scenes/subghz_scene_frequency_analyzer.c b/applications/main/subghz/scenes/subghz_scene_frequency_analyzer.c index d72cf0a57c..4343040244 100644 --- a/applications/main/subghz/scenes/subghz_scene_frequency_analyzer.c +++ b/applications/main/subghz/scenes/subghz_scene_frequency_analyzer.c @@ -70,9 +70,6 @@ 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 -#ifdef FURI_DEBUG - FURI_LOG_W(TAG, "Goto next scene!"); -#endif //scene_manager_set_scene_state(subghz->scene_manager, SubGhzSceneStart, 10); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiver); return true; diff --git a/applications/main/subghz/scenes/subghz_scene_read_raw.c b/applications/main/subghz/scenes/subghz_scene_read_raw.c index 46f22b0807..874c3b3ed5 100644 --- a/applications/main/subghz/scenes/subghz_scene_read_raw.c +++ b/applications/main/subghz/scenes/subghz_scene_read_raw.c @@ -104,6 +104,7 @@ void subghz_scene_read_raw_on_enter(void* context) { if(subghz_rx_key_state_get(subghz) != SubGhzRxKeyStateBack) { subghz_rx_key_state_set(subghz, SubGhzRxKeyStateIDLE); + if(furi_string_empty(file_name)) { subghz_txrx_set_preset_internal( subghz->txrx, diff --git a/applications/main/subghz/scenes/subghz_scene_receiver_config.c b/applications/main/subghz/scenes/subghz_scene_receiver_config.c index dc91d7e6ab..7986cbe661 100644 --- a/applications/main/subghz/scenes/subghz_scene_receiver_config.c +++ b/applications/main/subghz/scenes/subghz_scene_receiver_config.c @@ -414,6 +414,7 @@ static void subghz_scene_receiver_config_var_list_enter_callback(void* context, subghz->txrx, SUBGHZ_LAST_SETTING_DEFAULT_FREQUENCY, SUBGHZ_LAST_SETTING_DEFAULT_PRESET); + SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx); SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx); const char* preset_name = furi_string_get_cstr(preset.name); @@ -445,6 +446,7 @@ static void subghz_scene_receiver_config_var_list_enter_callback(void* context, variable_item_list_set_selected_item(subghz->variable_item_list, default_index); variable_item_list_reset(subghz->variable_item_list); + subghz_last_settings_save(subghz->last_settings); view_dispatcher_send_custom_event( @@ -738,6 +740,7 @@ void subghz_scene_receiver_config_on_exit(void* context) { variable_item_list_set_selected_item(subghz->variable_item_list, 0); variable_item_list_reset(subghz->variable_item_list); + subghz_last_settings_save(subghz->last_settings); scene_manager_set_scene_state( subghz->scene_manager, SubGhzSceneReadRAW, SubGhzCustomEventManagerNoSet); diff --git a/applications/main/subghz/subghz_last_settings.c b/applications/main/subghz/subghz_last_settings.c index 7f9aa22a88..4d1e44dc6e 100644 --- a/applications/main/subghz/subghz_last_settings.c +++ b/applications/main/subghz/subghz_last_settings.c @@ -4,7 +4,7 @@ #define TAG "SubGhzLastSettings" #define SUBGHZ_LAST_SETTING_FILE_TYPE "Flipper SubGhz Last Setting File" -#define SUBGHZ_LAST_SETTING_FILE_VERSION 2 +#define SUBGHZ_LAST_SETTING_FILE_VERSION 3 #define SUBGHZ_LAST_SETTINGS_PATH EXT_PATH("subghz/assets/last_subghz.settings") #define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY "Frequency" diff --git a/applications/main/subghz/views/subghz_frequency_analyzer.c b/applications/main/subghz/views/subghz_frequency_analyzer.c index bc472f2339..f16a38d3e5 100644 --- a/applications/main/subghz/views/subghz_frequency_analyzer.c +++ b/applications/main/subghz/views/subghz_frequency_analyzer.c @@ -228,9 +228,7 @@ uint32_t subghz_frequency_find_correct(uint32_t input) { uint32_t prev_freq = 0; uint32_t current = 0; uint32_t result = 0; -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "input: %ld", input); -#endif + for(size_t i = 0; i < sizeof(subghz_frequency_list); i++) { current = subghz_frequency_list[i]; if(current == input) { @@ -281,7 +279,7 @@ bool subghz_frequency_analyzer_input(InputEvent* event, void* context) { break; } subghz_frequency_analyzer_worker_set_trigger_level(instance->worker, trigger_level); - FURI_LOG_I(TAG, "trigger = %.1f", (double)trigger_level); + FURI_LOG_D(TAG, "trigger = %.1f", (double)trigger_level); need_redraw = true; } else if(event->type == InputTypePress && event->key == InputKeyUp) { if(instance->feedback_level == 0) { @@ -289,9 +287,7 @@ bool subghz_frequency_analyzer_input(InputEvent* event, void* context) { } else { instance->feedback_level--; } -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "feedback_level = %d", instance->feedback_level); -#endif + need_redraw = true; } else if( ((event->type == InputTypePress) || (event->type == InputTypeRepeat)) && @@ -324,13 +320,6 @@ bool subghz_frequency_analyzer_input(InputEvent* event, void* context) { } if(frequency_candidate > 0 && frequency_candidate != model->frequency_to_save) { -#ifdef FURI_DEBUG - FURI_LOG_D( - TAG, - "frequency_to_save: %ld, candidate: %ld", - model->frequency_to_save, - frequency_candidate); -#endif model->frequency_to_save = frequency_candidate; updated = true; } @@ -372,24 +361,12 @@ bool subghz_frequency_analyzer_input(InputEvent* event, void* context) { }, true); -#ifdef FURI_DEBUG - FURI_LOG_I( - TAG, - "updated: %d, long: %d, type: %d", - updated, - (event->type == InputTypeLong), - event->type); -#endif - if(updated) { instance->callback(SubGhzCustomEventViewFreqAnalOkShort, instance->context); } // First device receive short, then when user release button we get long if(event->type == InputTypeLong && frequency_to_save > 0) { -#ifdef FURI_DEBUG - FURI_LOG_I(TAG, "Long press!"); -#endif // Stop worker if(subghz_frequency_analyzer_worker_is_running(instance->worker)) { subghz_frequency_analyzer_worker_stop(instance->worker);