diff --git a/applications/barcode_generator/barcode_generator.c b/applications/barcode_generator/barcode_generator.c index efccbba60..59d5d6ddf 100644 --- a/applications/barcode_generator/barcode_generator.c +++ b/applications/barcode_generator/barcode_generator.c @@ -412,6 +412,7 @@ int32_t barcode_UPCA_generator_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, plugin_state, sizeof(PluginState))) { FURI_LOG_E("barcode_UPCA_generator", "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(plugin_state); return 255; } diff --git a/applications/clock_app/clock_app.c b/applications/clock_app/clock_app.c index 710184062..2931fac72 100644 --- a/applications/clock_app/clock_app.c +++ b/applications/clock_app/clock_app.c @@ -83,6 +83,7 @@ int32_t clock_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, plugin_state, sizeof(ClockState))) { FURI_LOG_E(TAG, "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(plugin_state); return 255; } diff --git a/applications/mousejacker/mousejacker.c b/applications/mousejacker/mousejacker.c index 481ed4be0..4e0094ab0 100644 --- a/applications/mousejacker/mousejacker.c +++ b/applications/mousejacker/mousejacker.c @@ -229,6 +229,7 @@ int32_t mousejacker_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, plugin_state, sizeof(PluginState))) { FURI_LOG_E("mousejacker", "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(plugin_state); return 255; } diff --git a/applications/nrfsniff/nrfsniff.c b/applications/nrfsniff/nrfsniff.c index eede7ad2c..e8dee30ac 100644 --- a/applications/nrfsniff/nrfsniff.c +++ b/applications/nrfsniff/nrfsniff.c @@ -34,7 +34,7 @@ typedef struct { char rate_text_fmt[] = "Transfer rate: %dMbps"; char channel_text_fmt[] = "Channel: %d"; char preamble_text_fmt[] = "Preamble: %02X"; -char sniff_text_fmt[] = "Sniffing: %s"; +char sniff_text_fmt[] = "Sniffing: %s Found: %d"; char addresses_header_text[] = "Address,rate"; char sniffed_address_fmt[] = "%s,%d"; char rate_text[46]; @@ -44,6 +44,7 @@ char sniff_text[38]; char sniffed_address[14]; uint8_t target_channel = 0; +uint32_t found_count = 0; uint8_t target_rate = 8; // rate can be either 8 (2Mbps) or 0 (1Mbps) uint8_t target_preamble[] = {0xAA, 0x00}; uint8_t sniffing_state = false; @@ -128,7 +129,7 @@ static void render_callback(Canvas* const canvas, void* ctx) { snprintf(rate_text, sizeof(rate_text), rate_text_fmt, (int)rate); snprintf(channel_text, sizeof(channel_text), channel_text_fmt, (int)target_channel); snprintf(preamble_text, sizeof(preamble_text), preamble_text_fmt, target_preamble[0]); - snprintf(sniff_text, sizeof(sniff_text), sniff_text_fmt, sniffing); + snprintf(sniff_text, sizeof(sniff_text), sniff_text_fmt, sniffing, found_count); snprintf( sniffed_address, sizeof(sniffed_address), sniffed_address_fmt, top_address, (int)rate); canvas_draw_str_aligned(canvas, 10, 10, AlignLeft, AlignBottom, rate_text); @@ -289,6 +290,7 @@ static void wrap_up(Storage* storage, NotificationApp* notification) { if(ch <= LOGITECH_MAX_CHANNEL) { hexlify(addr, 5, top_address); save_addr_to_file(storage, addr, 5, notification); + found_count++; break; } } @@ -310,6 +312,7 @@ int32_t nrfsniff_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, plugin_state, sizeof(PluginState))) { FURI_LOG_E(TAG, "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(plugin_state); return 255; } @@ -326,7 +329,6 @@ int32_t nrfsniff_app(void* p) { gui_add_view_port(gui, view_port, GuiLayerFullscreen); NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION); - furi_hal_power_suppress_charge_enter(); Storage* storage = furi_record_open(RECORD_STORAGE); storage_common_mkdir(storage, NRFSNIFF_APP_PATH_FOLDER); @@ -375,6 +377,7 @@ int32_t nrfsniff_app(void* p) { // toggle sniffing sniffing_state = !sniffing_state; if(sniffing_state) { + found_count = 0; start_sniffing(); start = furi_get_tick(); } else @@ -422,7 +425,6 @@ int32_t nrfsniff_app(void* p) { furi_hal_spi_release(nrf24_HANDLE); view_port_enabled_set(view_port, false); gui_remove_view_port(gui, view_port); - furi_hal_power_suppress_charge_exit(); furi_record_close(RECORD_GUI); furi_record_close(RECORD_NOTIFICATION); furi_record_close(RECORD_STORAGE); @@ -430,4 +432,4 @@ int32_t nrfsniff_app(void* p) { furi_message_queue_free(event_queue); return 0; -} +} \ No newline at end of file diff --git a/applications/sentry_safe/sentry_safe.c b/applications/sentry_safe/sentry_safe.c index b521b9b37..328b53f03 100644 --- a/applications/sentry_safe/sentry_safe.c +++ b/applications/sentry_safe/sentry_safe.c @@ -92,6 +92,7 @@ int32_t sentry_safe_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, sentry_state, sizeof(SentryState))) { FURI_LOG_E("SentrySafe", "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(sentry_state); return 255; } @@ -123,7 +124,6 @@ int32_t sentry_safe_app(void* p) { break; case InputKeyLeft: break; - case InputKeyOk: if(sentry_state->status == 2) { diff --git a/applications/snake_game/snake_game.c b/applications/snake_game/snake_game.c index e247ca367..2aad952f0 100644 --- a/applications/snake_game/snake_game.c +++ b/applications/snake_game/snake_game.c @@ -311,6 +311,7 @@ int32_t snake_game_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, snake_state, sizeof(SnakeState))) { FURI_LOG_E("SnakeGame", "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(snake_state); return 255; } diff --git a/applications/tetris_game/tetris_game.c b/applications/tetris_game/tetris_game.c index c4a9b13d6..678c9de31 100644 --- a/applications/tetris_game/tetris_game.c +++ b/applications/tetris_game/tetris_game.c @@ -354,6 +354,7 @@ int32_t tetris_game_app() { ValueMutex state_mutex; if(!init_mutex(&state_mutex, tetris_state, sizeof(TetrisState))) { FURI_LOG_E("TetrisGame", "cannot create mutex\r\n"); + furi_message_queue_free(event_queue); free(tetris_state); return 255; } diff --git a/applications/tictactoe_game/tictactoe_game.c b/applications/tictactoe_game/tictactoe_game.c index 0dbe2a5a6..769eaeb38 100644 --- a/applications/tictactoe_game/tictactoe_game.c +++ b/applications/tictactoe_game/tictactoe_game.c @@ -310,8 +310,8 @@ int32_t tictactoe_game_app(void* p) { ValueMutex state_mutex; if(!init_mutex(&state_mutex, tictactoe_state, sizeof(TicTacToeState))) { FURI_LOG_E(TAG, "Cannot create mutex\r\n"); - free(tictactoe_state); furi_message_queue_free(event_queue); + free(tictactoe_state); return 255; }