diff --git a/applications/main/nfc/scenes/nfc_scene_mfkey_nonces_info.c b/applications/main/nfc/scenes/nfc_scene_mfkey_nonces_info.c index 89964f340..6d9852f3e 100644 --- a/applications/main/nfc/scenes/nfc_scene_mfkey_nonces_info.c +++ b/applications/main/nfc/scenes/nfc_scene_mfkey_nonces_info.c @@ -16,7 +16,7 @@ void nfc_scene_mfkey_nonces_info_on_enter(void* context) { uint16_t nonces_saved = mfkey32_get_auth_sectors(temp_str); widget_add_text_scroll_element(nfc->widget, 0, 22, 128, 42, furi_string_get_cstr(temp_str)); - furi_string_printf(temp_str, "Nonce pairs saved %d", nonces_saved); + furi_string_printf(temp_str, "Nonce pairs saved: %d", nonces_saved); widget_add_string_element( nfc->widget, 0, 0, AlignLeft, AlignTop, FontPrimary, furi_string_get_cstr(temp_str)); widget_add_string_element( diff --git a/applications/main/subghz/subghz_history.c b/applications/main/subghz/subghz_history.c index d4faa0b49..b09002853 100644 --- a/applications/main/subghz/subghz_history.c +++ b/applications/main/subghz/subghz_history.c @@ -13,7 +13,7 @@ #define SUBGHZ_HISTORY_TMP_EXTENSION ".tmp" #define SUBGHZ_HISTORY_TMP_SIGNAL_MAX_LEVEL_DURATION 700 #define SUBGHZ_HISTORY_TMP_SIGNAL_MIN_LEVEL_DURATION 100 -#define SUBGHZ_HISTORY_TMP_REMOVE_FILES false +#define SUBGHZ_HISTORY_TMP_REMOVE_FILES true #define SUBGHZ_HISTORY_TMP_RAW_KEY "RAW_Data" #define TAG "SubGhzHistory" @@ -52,8 +52,7 @@ struct SubGhzHistory { FuriString* subghz_history_generate_temp_filename(uint32_t index) { FuriHalRtcDateTime datetime = {0}; furi_hal_rtc_get_datetime(&datetime); - FuriString* filename = furi_string_alloc_printf("%03d%s", index, SUBGHZ_HISTORY_TMP_EXTENSION); - return filename; + return furi_string_alloc_printf("%03d%s", index, SUBGHZ_HISTORY_TMP_EXTENSION); } bool subghz_history_is_tmp_dir_exists(SubGhzHistory* instance) { @@ -103,7 +102,7 @@ void subghz_history_clear_tmp_dir(SubGhzHistory* instance) { // Nothing to do here! return; } - uint32_t start_time = furi_get_tick(); + //uint32_t start_time = furi_get_tick(); #ifdef SUBGHZ_HISTORY_TMP_REMOVE_FILES // Stage 0 - Dir exists? bool res = subghz_history_is_tmp_dir_exists(instance); @@ -123,8 +122,8 @@ void subghz_history_clear_tmp_dir(SubGhzHistory* instance) { FURI_LOG_E(TAG, "Cannot process temp dir!"); } #endif - uint32_t stop_time = furi_get_tick() - start_time; - FURI_LOG_I(TAG, "Running time (clear_tmp_dir): %d ms", stop_time); + /* uint32_t stop_time = furi_get_tick() - start_time; + FURI_LOG_I(TAG, "Running time (clear_tmp_dir): %d ms", stop_time);*/ } SubGhzHistory* subghz_history_alloc(void) { @@ -237,11 +236,9 @@ FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx bool result_ok = false; if(instance->write_tmp_files && item->is_file) { // We have files! - FuriString* filename; + FuriString* filename = subghz_history_generate_temp_filename(idx); FuriString* dir_path; - filename = furi_string_alloc(); - dir_path = furi_string_alloc(); - filename = subghz_history_generate_temp_filename(idx); + dir_path = furi_string_alloc_printf( "%s/%s", SUBGHZ_HISTORY_TMP_DIR, furi_string_get_cstr(filename)); @@ -353,8 +350,8 @@ bool subghz_history_add_to_history( FURI_LOG_E(TAG, "Missing Protocol"); break; } else { - item->protocol_name = - furi_string_alloc_printf("%s", furi_string_get_cstr(instance->tmp_string)); + furi_string_printf( + item->protocol_name, "%s", furi_string_get_cstr(instance->tmp_string)); } if(!strcmp(furi_string_get_cstr(instance->tmp_string), "RAW")) { furi_string_printf( @@ -414,12 +411,10 @@ bool subghz_history_add_to_history( // If we can write to files if(instance->write_tmp_files && tmp_file_for_raw) { - FuriString* filename; + FuriString* filename = subghz_history_generate_temp_filename(instance->last_index_write); FuriString* dir_path; - filename = furi_string_alloc(); dir_path = furi_string_alloc(); - filename = subghz_history_generate_temp_filename(instance->last_index_write); furi_string_cat_printf( dir_path, "%s/%s", SUBGHZ_HISTORY_TMP_DIR, furi_string_get_cstr(filename)); #ifdef FURI_DEBUG diff --git a/applications/plugins/bt_hid_app/views/bt_hid_keyboard.c b/applications/plugins/bt_hid_app/views/bt_hid_keyboard.c index 3617dc0f1..8b9ae593a 100644 --- a/applications/plugins/bt_hid_app/views/bt_hid_keyboard.c +++ b/applications/plugins/bt_hid_app/views/bt_hid_keyboard.c @@ -209,6 +209,11 @@ static void bt_hid_keyboard_draw_callback(Canvas* canvas, void* context) { canvas_draw_icon(canvas, 0, 0, &I_Ble_disconnected_15x15); canvas_set_font(canvas, FontPrimary); elements_multiline_text_aligned(canvas, 17, 3, AlignLeft, AlignTop, "Keyboard"); + + canvas_draw_icon(canvas, 68, 3, &I_Pin_back_arrow_10x8); + canvas_set_font(canvas, FontSecondary); + elements_multiline_text_aligned(canvas, 127, 4, AlignRight, AlignTop, "Hold to exit"); + elements_multiline_text_aligned( canvas, 4, 60, AlignLeft, AlignBottom, "Waiting for Connection..."); return; // Dont render the keyboard if we are not yet connected diff --git a/lib/nfc/helpers/mfkey32.c b/lib/nfc/helpers/mfkey32.c index 265248d5e..fa5713f27 100644 --- a/lib/nfc/helpers/mfkey32.c +++ b/lib/nfc/helpers/mfkey32.c @@ -91,9 +91,7 @@ void mfkey32_set_callback(Mfkey32* instance, Mfkey32ParseDataCallback callback, } static bool mfkey32_write_params(Mfkey32* instance, Mfkey32Params* params) { - FuriString* str; - - str = furi_string_alloc_printf( + FuriString* str = furi_string_alloc_printf( "Sec %d key %c cuid %08x nt0 %08x nr0 %08x ar0 %08x nt1 %08x nr1 %08x ar1 %08x\n", params->sector, params->key == MfClassicKeyA ? 'A' : 'B',