diff --git a/applications/external/nrf24mousejacker/mousejacker.c b/applications/external/nrf24mousejacker/mousejacker.c index 5b3cce336..03119e021 100644 --- a/applications/external/nrf24mousejacker/mousejacker.c +++ b/applications/external/nrf24mousejacker/mousejacker.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "mousejacker_ducky.h" #include @@ -290,6 +291,8 @@ int32_t mousejacker_app(void* p) { return 255; } + NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION); + // Set system callbacks ViewPort* view_port = view_port_alloc(); view_port_draw_callback_set(view_port, render_callback, plugin_state); @@ -308,10 +311,6 @@ int32_t mousejacker_app(void* p) { furi_thread_set_context(plugin_state->mjthread, plugin_state); furi_thread_set_callback(plugin_state->mjthread, mj_worker_thread); - while(!furi_hal_speaker_acquire(100)) { - furi_delay_ms(100); - } - // spawn load file dialog to choose sniffed addresses file if(load_addrs_file(plugin_state->file_stream)) { addr_idx = 0; @@ -356,9 +355,7 @@ int32_t mousejacker_app(void* p) { if(!nrf24_check_connected(nrf24_HANDLE)) { plugin_state->is_nrf24_connected = false; view_port_update(view_port); - furi_hal_speaker_start(100, 100); - furi_delay_ms(100); - furi_hal_speaker_stop(); + notification_message(notification, &sequence_error); } else if(!plugin_state->is_thread_running) { furi_thread_start(plugin_state->mjthread); view_port_update(view_port); @@ -387,9 +384,9 @@ int32_t mousejacker_app(void* p) { furi_thread_free(plugin_state->mjthread); nrf24_deinit(); - furi_hal_speaker_release(); view_port_enabled_set(view_port, false); gui_remove_view_port(gui, view_port); + furi_record_close(RECORD_NOTIFICATION); furi_record_close(RECORD_GUI); furi_record_close(RECORD_STORAGE); view_port_free(view_port); diff --git a/applications/external/nrf24sniff/nrfsniff.c b/applications/external/nrf24sniff/nrfsniff.c index 18cbe6fb7..cad16f349 100644 --- a/applications/external/nrf24sniff/nrfsniff.c +++ b/applications/external/nrf24sniff/nrfsniff.c @@ -404,9 +404,7 @@ int32_t nrfsniff_app(void* p) { wrap_up(storage, notification); } } else { - furi_hal_speaker_start(100, 100); - furi_delay_ms(100); - furi_hal_speaker_stop(); + notification_message(notification, &sequence_error); } break;