From 85e39b53a1ed8795940b4c2f9a879a974463d3bc Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 01:34:48 -0500 Subject: [PATCH 1/6] upd wifi marauder --- ReadMe.md | 16 +--- .../wifi_marauder_scene_console_output.c | 2 +- .../scenes/wifi_marauder_scene_start.c | 38 ++++++-- .../scenes/wifi_marauder_scene_text_input.c | 88 ++++++++++++++++++- .../wifi_marauder_app.c | 2 + .../wifi_marauder_app_i.h | 7 +- .../wifi_marauder_custom_event.h | 2 + 7 files changed, 127 insertions(+), 28 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 0dab31b89..b1d48951f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -22,19 +22,7 @@ Thank you to all the supporters! - Last Synced/Checked [Unleashed/xMasterX](https://github.com/DarkFlippers/unleashed-firmware), changes in [changelog](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/CHANGELOG.md) and in [commits](https://github.com/DarkFlippers/unleashed-firmware/commits/dev): `2022-12-23 10:44 EST` - Last Synced/Checked [OFW](https://github.com/flipperdevices/flipperzero-firmware), changes in [commits](https://github.com/flipperdevices/flipperzero-firmware/commits/dev): `2022-12-23 10:44 EST` -- Updated: [NRF24 Scanner v2.0 (By vad7)](https://github.com/vad7/nrf24scan) -- New Animation: [Hentai (By qqMajikpp)](https://github.com/qqmajikpp/) for [PATREON members](https://www.patreon.com/RogueMaster/membership) now included on 18Plus releases -- [PATREON ONLY UPDATES: For STOCK Animations Release: Not Stoned, Passport display closer to OFW, Passport avatar from OFW, Top desktop bar from OFW & Internal Apps have OFW animation scenes](https://www.patreon.com/RogueMaster/) -- Swapped favorite buttons to fix Favorite location bug. -- Updated: [Authenticator/TOTP (By akopachov)](https://github.com/akopachov/flipper-zero_authenticator) -- Updated: [NRF24 Scanner v2.1 (By vad7)](https://github.com/vad7/nrf24scan) -- Fixed passport to show more data for EXP -- Added: [Mifare dictionary attack performance improvements. #2173 (By nezza)](https://github.com/flipperdevices/flipperzero-firmware/pull/2173) -- [New PAXGOD Build: Unlocked, 1 New Custom PaxGod animation and non-anime/RM animations from Minimal, and Mountains Passport Theme (from Kuranons) on PATREON](https://www.patreon.com/posts/76225261) - Custom FW Builds available for [PATREON subscribers](https://www.patreon.com/RogueMaster/membership) -- Updated: [NRF24 Scanner v2.1 (By vad7)](https://github.com/vad7/nrf24scan) -- Added: [2048 (By eugene-kirzhanov)](https://github.com/eugene-kirzhanov/flipper-zero-2048-game) (Titled 2048 (Improved)) -- Fixed game mode 2048 to new version -- [18 Plus Build Update: 5 New Animations included on 18 Plus releases](https://www.patreon.com/posts/76253078) +- Updated: [WiFi (Marauder) v3.0 (By 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion) `Req: ESP32 WITH MARAUDER FLASHED` ## Install from Release FLASH STOCK FIRST BEFORE UPDATING TO CUSTOM FIRMWARE! @@ -258,7 +246,7 @@ $ ./fbt resources icons dolphin_ext - [USB Midi (By DrZlo13)](https://github.com/DrZlo13/flipper-zero-usb-midi) with thanks to [xMasterX](https://github.com/xMasterX/unleashed-extra-pack) - [WAV Player (By DrZlo13)](https://github.com/flipperdevices/flipperzero-firmware/tree/zlo/wav-player) Updated by Atmanos & RogueMaster To Work - [WiFi (Deauther) V2 (By Timmotools)](https://github.com/Timmotools/flipperzero_esp8266_deautherv2) `Req: ESP8266` -- [WiFi (Marauder) (By 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion) `Req: ESP32 WITH MARAUDER FLASHED` +- [WiFi (Marauder) v3.0 (By 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion) `Req: ESP32 WITH MARAUDER FLASHED` - [WiFi Scanner v.0.4 (By SequoiaSan)](https://github.com/SequoiaSan/FlipperZero-WiFi-Scanner_Module-ESP8266) `Req: ESP8266 or ESP32` - [Wii EC Analyser (By csBlueChip)](https://github.com/csBlueChip/FlipperZero_WiiEC) - [Zero Tracker (By DrZZlo13)](https://github.com/DrZlo13/flipper-zero-music-tracker) diff --git a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c index 25ea0abb0..8b9984dbf 100644 --- a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c +++ b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c @@ -34,7 +34,7 @@ void wifi_marauder_scene_console_output_on_enter(void* context) { app->text_box_store_strlen = 0; if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) { const char* help_msg = - "Marauder companion v0.2.2\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n"; + "Marauder companion v0.3.0\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n"; furi_string_cat_str(app->text_box_store, help_msg); app->text_box_store_strlen += strlen(help_msg); } diff --git a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c index 029614c5d..1ba810efe 100644 --- a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c +++ b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c @@ -26,7 +26,7 @@ typedef struct { // NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it! const WifiMarauderItem items[NUM_MENU_ITEMS] = { {"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP}, - {"Scan AP", {""}, 1, {"scanap"}, NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP}, + {"Scan", {"ap", "station"}, 2, {"scanap", "scansta"}, NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP}, {"SSID", {"add rand", "add name", "remove"}, 3, @@ -34,12 +34,24 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = { INPUT_ARGS, FOCUS_CONSOLE_START, NO_TIP}, - {"List", {"ap", "ssid"}, 2, {"list -a", "list -s"}, NO_ARGS, FOCUS_CONSOLE_START, NO_TIP}, - {"Select", {"ap", "ssid"}, 2, {"select -a", "select -s"}, INPUT_ARGS, FOCUS_CONSOLE_END, NO_TIP}, + {"List", + {"ap", "ssid", "station"}, + 3, + {"list -a", "list -s", "list -c"}, + NO_ARGS, + FOCUS_CONSOLE_START, + NO_TIP}, + {"Select", + {"ap", "ssid", "station"}, + 3, + {"select -a", "select -s", "select -c"}, + INPUT_ARGS, + FOCUS_CONSOLE_END, + NO_TIP}, {"Clear List", - {"ap", "ssid"}, - 2, - {"clearlist -a", "clearlist -s"}, + {"ap", "ssid", "station"}, + 3, + {"clearlist -a", "clearlist -s", "clearlist -c"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP}, @@ -50,6 +62,13 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = { NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP}, + {"Targeted Deauth", + {"station", "manual"}, + 2, + {"attack -t deauth -c", "attack -t deauth -s"}, + TOGGLE_ARGS, + FOCUS_CONSOLE_END, + SHOW_STOPSCAN_TIP}, {"Beacon Spam", {"ap list", "ssid list", "random"}, 3, @@ -87,18 +106,19 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = { FOCUS_CONSOLE_END, NO_TIP}, {"Settings", - {"display", "restore", "ForcePMKID", "ForceProbe", "SavePCAP", "other"}, - 6, + {"display", "restore", "ForcePMKID", "ForceProbe", "SavePCAP", "EnableLED", "other"}, + 7, {"settings", "settings -r", "settings -s ForcePMKID enable", "settings -s ForceProbe enable", "settings -s SavePCAP enable", + "settings -s EnableLED enable", "settings -s"}, TOGGLE_ARGS, FOCUS_CONSOLE_START, NO_TIP}, - {"Update", {""}, 1, {"update -w"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP}, + {"Update", {"ota", "sd"}, 2, {"update -w", "update -s"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP}, {"Reboot", {""}, 1, {"reboot"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP}, {"Help", {""}, 1, {"help"}, NO_ARGS, FOCUS_CONSOLE_START, SHOW_STOPSCAN_TIP}, }; diff --git a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_text_input.c b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_text_input.c index 061e9c5fe..ac8b15a2d 100644 --- a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_text_input.c +++ b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_text_input.c @@ -3,13 +3,34 @@ void wifi_marauder_scene_text_input_callback(void* context) { WifiMarauderApp* app = context; - view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventStartConsole); + switch(app->special_case_input_step) { + case 0: // most commands + view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventStartConsole); + break; + case 1: // special case for deauth: save source MAC + view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventSaveSourceMac); + break; + case 2: // special case for deauth: save destination MAC + view_dispatcher_send_custom_event( + app->view_dispatcher, WifiMarauderEventSaveDestinationMac); + break; + default: + break; + } } void wifi_marauder_scene_text_input_on_enter(void* context) { WifiMarauderApp* app = context; - if(false == app->is_custom_tx_string) { + if(0 == + strncmp("attack -t deauth -s", app->selected_tx_string, strlen("attack -t deauth -s"))) { + // Special case for manual deauth input + app->special_case_input_step = 1; + bzero(app->text_input_store, WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE); + } else if(false == app->is_custom_tx_string) { + // Most commands + app->special_case_input_step = 0; + // Fill text input with selected string so that user can add to it size_t length = strlen(app->selected_tx_string); furi_assert(length < WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE); @@ -25,7 +46,9 @@ void wifi_marauder_scene_text_input_on_enter(void* context) { // Setup view TextInput* text_input = app->text_input; // Add help message to header - if(0 == strncmp("ssid -a -g", app->selected_tx_string, strlen("ssid -a -g"))) { + if(app->special_case_input_step == 1) { + text_input_set_header_text(text_input, "Enter source MAC"); + } else if(0 == strncmp("ssid -a -g", app->selected_tx_string, strlen("ssid -a -g"))) { text_input_set_header_text(text_input, "Enter # SSIDs to generate"); } else if(0 == strncmp("ssid -a -n", app->selected_tx_string, strlen("ssid -a -n"))) { text_input_set_header_text(text_input, "Enter SSID name to add"); @@ -59,6 +82,65 @@ bool wifi_marauder_scene_text_input_on_event(void* context, SceneManagerEvent ev app->selected_tx_string = app->text_input_store; scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput); consumed = true; + } else if(event.event == WifiMarauderEventSaveSourceMac) { + if(12 != strlen(app->text_input_store)) { + text_input_set_header_text(app->text_input, "MAC must be 12 hex chars!"); + } else { + snprintf( + app->special_case_input_src_addr, + sizeof(app->special_case_input_src_addr), + "%c%c:%c%c:%c%c:%c%c:%c%c:%c%c", + app->text_input_store[0], + app->text_input_store[1], + app->text_input_store[2], + app->text_input_store[3], + app->text_input_store[4], + app->text_input_store[5], + app->text_input_store[6], + app->text_input_store[7], + app->text_input_store[8], + app->text_input_store[9], + app->text_input_store[10], + app->text_input_store[11]); + + // Advance scene to input destination MAC, clear text input + app->special_case_input_step = 2; + bzero(app->text_input_store, WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE); + text_input_set_header_text(app->text_input, "Enter destination MAC"); + } + consumed = true; + } else if(event.event == WifiMarauderEventSaveDestinationMac) { + if(12 != strlen(app->text_input_store)) { + text_input_set_header_text(app->text_input, "MAC must be 12 hex chars!"); + } else { + snprintf( + app->special_case_input_dst_addr, + sizeof(app->special_case_input_dst_addr), + "%c%c:%c%c:%c%c:%c%c:%c%c:%c%c", + app->text_input_store[0], + app->text_input_store[1], + app->text_input_store[2], + app->text_input_store[3], + app->text_input_store[4], + app->text_input_store[5], + app->text_input_store[6], + app->text_input_store[7], + app->text_input_store[8], + app->text_input_store[9], + app->text_input_store[10], + app->text_input_store[11]); + + // Construct command with source and destination MACs + snprintf( + app->text_input_store, + WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE, + "attack -t deauth -s %18s -d %18s", + app->special_case_input_src_addr, + app->special_case_input_dst_addr); + app->selected_tx_string = app->text_input_store; + scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput); + } + consumed = true; } } diff --git a/applications/plugins/wifi_marauder_companion/wifi_marauder_app.c b/applications/plugins/wifi_marauder_companion/wifi_marauder_app.c index 2a4b23e8b..79d35a808 100644 --- a/applications/plugins/wifi_marauder_companion/wifi_marauder_app.c +++ b/applications/plugins/wifi_marauder_companion/wifi_marauder_app.c @@ -50,6 +50,8 @@ WifiMarauderApp* wifi_marauder_app_alloc() { app->selected_option_index[i] = 0; } + app->special_case_input_step = 0; + app->text_box = text_box_alloc(); view_dispatcher_add_view( app->view_dispatcher, WifiMarauderAppViewConsoleOutput, text_box_get_view(app->text_box)); diff --git a/applications/plugins/wifi_marauder_companion/wifi_marauder_app_i.h b/applications/plugins/wifi_marauder_companion/wifi_marauder_app_i.h index f571a11a2..4df9e326b 100644 --- a/applications/plugins/wifi_marauder_companion/wifi_marauder_app_i.h +++ b/applications/plugins/wifi_marauder_companion/wifi_marauder_app_i.h @@ -14,7 +14,7 @@ #include #include -#define NUM_MENU_ITEMS (15) +#define NUM_MENU_ITEMS (16) #define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096) #define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512) @@ -41,6 +41,11 @@ struct WifiMarauderApp { bool is_custom_tx_string; bool focus_console_start; bool show_stopscan_tip; + + // For input source and destination MAC in targeted deauth attack + int special_case_input_step; + char special_case_input_src_addr[20]; + char special_case_input_dst_addr[20]; }; // Supported commands: diff --git a/applications/plugins/wifi_marauder_companion/wifi_marauder_custom_event.h b/applications/plugins/wifi_marauder_companion/wifi_marauder_custom_event.h index fe1bff6af..990b457f5 100644 --- a/applications/plugins/wifi_marauder_companion/wifi_marauder_custom_event.h +++ b/applications/plugins/wifi_marauder_companion/wifi_marauder_custom_event.h @@ -4,4 +4,6 @@ typedef enum { WifiMarauderEventRefreshConsoleOutput = 0, WifiMarauderEventStartConsole, WifiMarauderEventStartKeyboard, + WifiMarauderEventSaveSourceMac, + WifiMarauderEventSaveDestinationMac } WifiMarauderCustomEvent; From 9ee1322f8d111373e9990ddc576cccdf7e296112 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 01:35:47 -0500 Subject: [PATCH 2/6] FMT --- .../scenes/wifi_marauder_scene_start.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c index 1ba810efe..df759bd15 100644 --- a/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c +++ b/applications/plugins/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c @@ -26,7 +26,13 @@ typedef struct { // NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it! const WifiMarauderItem items[NUM_MENU_ITEMS] = { {"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP}, - {"Scan", {"ap", "station"}, 2, {"scanap", "scansta"}, NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP}, + {"Scan", + {"ap", "station"}, + 2, + {"scanap", "scansta"}, + NO_ARGS, + FOCUS_CONSOLE_END, + SHOW_STOPSCAN_TIP}, {"SSID", {"add rand", "add name", "remove"}, 3, From 05f8cf2492f6dc57f3281aea2c879393cedaa42c Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 01:52:18 -0500 Subject: [PATCH 3/6] 4 minor updates --- ReadMe.md | 8 +++- applications/plugins/bpmtapper/README.md | 2 +- .../plugins/bpmtapper/application.fam | 4 +- applications/plugins/bpmtapper/bpm.c | 39 +++++++++--------- applications/plugins/metronome/README.md | 4 +- .../plugins/metronome/application.fam | 2 +- .../plugins/metronome/gui_extensions.c | 2 +- .../plugins/metronome/images/ButtonUp_7x4.png | Bin 102 -> 0 bytes applications/plugins/metronome/metronome.c | 35 +++++++--------- applications/plugins/minesweeper/README.md | 2 - .../plugins/minesweeper/minesweeper.c | 8 +--- applications/plugins/nrf24scan/nrf24scan.c | 24 +++++++---- .../apps_data/nrf24scan/addresses.txt | 1 + 13 files changed, 63 insertions(+), 68 deletions(-) delete mode 100644 applications/plugins/metronome/images/ButtonUp_7x4.png diff --git a/ReadMe.md b/ReadMe.md index b1d48951f..6a9177677 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -20,9 +20,13 @@ Thank you to all the supporters! ## [BUILDS NOW AVAILABLE WITH STOCK, RM SELECT, RM SELECT + 18PLUS, RM MINIMAL (default) and RM 18PLUS ANIMATION SETS](https://www.patreon.com/RogueMaster/membership) -- Last Synced/Checked [Unleashed/xMasterX](https://github.com/DarkFlippers/unleashed-firmware), changes in [changelog](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/CHANGELOG.md) and in [commits](https://github.com/DarkFlippers/unleashed-firmware/commits/dev): `2022-12-23 10:44 EST` -- Last Synced/Checked [OFW](https://github.com/flipperdevices/flipperzero-firmware), changes in [commits](https://github.com/flipperdevices/flipperzero-firmware/commits/dev): `2022-12-23 10:44 EST` +- Last Synced/Checked [Unleashed/xMasterX](https://github.com/DarkFlippers/unleashed-firmware), changes in [changelog](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/CHANGELOG.md) and in [commits](https://github.com/DarkFlippers/unleashed-firmware/commits/dev): `2022-12-24 01:42 EST` +- Last Synced/Checked [OFW](https://github.com/flipperdevices/flipperzero-firmware), changes in [commits](https://github.com/flipperdevices/flipperzero-firmware/commits/dev): `2022-12-24 01:42 EST` - Updated: [WiFi (Marauder) v3.0 (By 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion) `Req: ESP32 WITH MARAUDER FLASHED` +- Updated: [BPM Tapper (By panki27)](https://github.com/panki27/bpm-tapper) +- Updated: [Metronome (By panki27)](https://github.com/panki27/Metronome) +- Updated: [Minesweeper (By panki27)](https://github.com/panki27/minesweeper) +- Updated: [NRF24 Scanner v2.1 (By vad7)](https://github.com/vad7/nrf24scan) ## Install from Release FLASH STOCK FIRST BEFORE UPDATING TO CUSTOM FIRMWARE! diff --git a/applications/plugins/bpmtapper/README.md b/applications/plugins/bpmtapper/README.md index 8e88863ee..224d2cb5b 100644 --- a/applications/plugins/bpmtapper/README.md +++ b/applications/plugins/bpmtapper/README.md @@ -9,6 +9,6 @@ Hit any button other than back repeatedly. Calculates based on the average of th ## Compiling ``` -./fbt firmware_bpm_tapper +./fbt fap_bpm_tapper ``` diff --git a/applications/plugins/bpmtapper/application.fam b/applications/plugins/bpmtapper/application.fam index 93c4179c5..b6ad315b6 100644 --- a/applications/plugins/bpmtapper/application.fam +++ b/applications/plugins/bpmtapper/application.fam @@ -7,7 +7,7 @@ App( requires=["gui"], stack_size=2 * 1024, fap_icon="bpm_10px.png", - fap_category="Music", fap_icon_assets="icons", - order=15, + fap_category="Music", + order=35, ) diff --git a/applications/plugins/bpmtapper/bpm.c b/applications/plugins/bpmtapper/bpm.c index cee83a6a4..323a898a4 100644 --- a/applications/plugins/bpmtapper/bpm.c +++ b/applications/plugins/bpmtapper/bpm.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "BPM_Tapper_icons.h" @@ -126,7 +127,7 @@ static void input_callback(InputEvent* input_event, FuriMessageQueue* event_queu } static void render_callback(Canvas* const canvas, void* ctx) { - FuriString* tempStr; + string_t tempStr; const BPMTapper* bpm_state = acquire_mutex((ValueMutex*)ctx, 25); if(bpm_state == NULL) { @@ -136,32 +137,30 @@ static void render_callback(Canvas* const canvas, void* ctx) { //canvas_draw_frame(canvas, 0, 0, 128, 64); canvas_set_font(canvas, FontPrimary); - tempStr = furi_string_alloc(); + string_init(tempStr); - furi_string_printf(tempStr, "Taps: %d", bpm_state->taps); - canvas_draw_str_aligned(canvas, 5, 10, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + string_printf(tempStr, "Taps: %d", bpm_state->taps); + canvas_draw_str_aligned(canvas, 5, 10, AlignLeft, AlignBottom, string_get_cstr(tempStr)); + string_reset(tempStr); - furi_string_printf(tempStr, "Queue: %d", bpm_state->tap_queue->size); - canvas_draw_str_aligned(canvas, 70, 10, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + string_printf(tempStr, "Queue: %d", bpm_state->tap_queue->size); + canvas_draw_str_aligned(canvas, 70, 10, AlignLeft, AlignBottom, string_get_cstr(tempStr)); + string_reset(tempStr); - furi_string_printf(tempStr, "Interval: %ldms", bpm_state->interval); - canvas_draw_str_aligned(canvas, 5, 20, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + string_printf(tempStr, "Interval: %dms", bpm_state->interval); + canvas_draw_str_aligned(canvas, 5, 20, AlignLeft, AlignBottom, string_get_cstr(tempStr)); + string_reset(tempStr); - furi_string_printf(tempStr, "x2 %.2f /2 %.2f", bpm_state->bpm * 2, bpm_state->bpm / 2); - canvas_draw_str_aligned( - canvas, 64, 60, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + string_printf(tempStr, "x2 %.2f /2 %.2f", bpm_state->bpm * 2, bpm_state->bpm / 2); + canvas_draw_str_aligned(canvas, 64, 60, AlignCenter, AlignCenter, string_get_cstr(tempStr)); + string_reset(tempStr); - furi_string_printf(tempStr, "%.2f", bpm_state->bpm); + string_printf(tempStr, "%.2f", bpm_state->bpm); canvas_set_font(canvas, FontBigNumbers); - canvas_draw_str_aligned( - canvas, 64, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + canvas_draw_str_aligned(canvas, 64, 40, AlignCenter, AlignCenter, string_get_cstr(tempStr)); + string_reset(tempStr); - furi_string_free(tempStr); + string_clear(tempStr); release_mutex((ValueMutex*)ctx, bpm_state); } diff --git a/applications/plugins/metronome/README.md b/applications/plugins/metronome/README.md index 4b6cd3122..79134c350 100644 --- a/applications/plugins/metronome/README.md +++ b/applications/plugins/metronome/README.md @@ -1,7 +1,5 @@ # Metronome -[Original link](https://github.com/panki27/Metronome) - A metronome for the [Flipper Zero](https://flipperzero.one/) device. Goes along perfectly with my [BPM tapper](https://github.com/panki27/bpm-tapper). ![screenshot](img/screenshot.png) @@ -19,5 +17,5 @@ A metronome for the [Flipper Zero](https://flipperzero.one/) device. Goes along ## Compiling ``` -./fbt firmware_metronome +./fbt fap_metronome ``` diff --git a/applications/plugins/metronome/application.fam b/applications/plugins/metronome/application.fam index 32588d06e..b40809638 100644 --- a/applications/plugins/metronome/application.fam +++ b/applications/plugins/metronome/application.fam @@ -8,8 +8,8 @@ App( "gui", ], fap_icon="metronome_icon.png", + fap_icon_assets="icons", fap_category="Music", - fap_icon_assets="images", stack_size=2 * 1024, order=20, ) diff --git a/applications/plugins/metronome/gui_extensions.c b/applications/plugins/metronome/gui_extensions.c index 458eb137b..a7661ec28 100644 --- a/applications/plugins/metronome/gui_extensions.c +++ b/applications/plugins/metronome/gui_extensions.c @@ -1,6 +1,6 @@ #include #include -#include +#include "Metronome_icons.h" //lib can only do bottom left/right void elements_button_top_left(Canvas* canvas, const char* str) { diff --git a/applications/plugins/metronome/images/ButtonUp_7x4.png b/applications/plugins/metronome/images/ButtonUp_7x4.png deleted file mode 100644 index 1be79328b40a93297a5609756328406565c437c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)I!3HFqj;YoHDIHH2#}J8d-yTOk1_O>mFaFD) zeWb+ZHz{mGZZ1QpXe09^4tcYT#4oe=UbmGC^A-KE*|F&zP#=S*tDnm{r-UX30HgpM AM*si- diff --git a/applications/plugins/metronome/metronome.c b/applications/plugins/metronome/metronome.c index 5c1105574..4c374aa75 100644 --- a/applications/plugins/metronome/metronome.c +++ b/applications/plugins/metronome/metronome.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -57,26 +58,23 @@ static void render_callback(Canvas* const canvas, void* ctx) { return; } - FuriString* tempStr; - tempStr = furi_string_alloc(); + string_t tempStr; + string_init(tempStr); canvas_draw_frame(canvas, 0, 0, 128, 64); canvas_set_font(canvas, FontPrimary); // draw bars/beat - furi_string_printf( - tempStr, "%d/%d", metronome_state->beats_per_bar, metronome_state->note_length); - canvas_draw_str_aligned( - canvas, 64, 8, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + string_printf(tempStr, "%d/%d", metronome_state->beats_per_bar, metronome_state->note_length); + canvas_draw_str_aligned(canvas, 64, 8, AlignCenter, AlignCenter, string_get_cstr(tempStr)); + string_reset(tempStr); // draw BPM value - furi_string_printf(tempStr, "%.2f", metronome_state->bpm); + string_printf(tempStr, "%.2f", metronome_state->bpm); canvas_set_font(canvas, FontBigNumbers); - canvas_draw_str_aligned( - canvas, 64, 24, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr)); - furi_string_reset(tempStr); + canvas_draw_str_aligned(canvas, 64, 24, AlignCenter, AlignCenter, string_get_cstr(tempStr)); + string_reset(tempStr); // draw volume indicator // always draw first waves @@ -128,7 +126,7 @@ static void render_callback(Canvas* const canvas, void* ctx) { canvas, 8, 36, 112, (float)metronome_state->current_beat / metronome_state->beats_per_bar); // cleanup - furi_string_free(tempStr); + string_clear(tempStr); release_mutex((ValueMutex*)ctx, metronome_state); } @@ -160,8 +158,6 @@ static void timer_callback(void* ctx) { break; case Silent: break; - default: - break; } } else { // unpronounced beat @@ -177,8 +173,6 @@ static void timer_callback(void* ctx) { break; case Silent: break; - default: - break; } }; @@ -203,8 +197,6 @@ static void timer_callback(void* ctx) { break; case Silent: break; - default: - break; } notification_message(metronome_state->notifications, &sequence_reset_rgb); @@ -295,6 +287,7 @@ int32_t metronome_app() { metronome_state->timer = furi_timer_alloc(timer_callback, FuriTimerTypePeriodic, &state_mutex); // Open GUI and register view_port + // Gui* gui = furi_record_open("gui"); gui_add_view_port(gui, view_port, GuiLayerFullscreen); @@ -333,7 +326,7 @@ int32_t metronome_app() { case InputKeyBack: processing = false; break; - default: + case InputKeyMAX: break; } } else if(event.input.type == InputTypeLong) { @@ -355,7 +348,7 @@ int32_t metronome_app() { case InputKeyBack: processing = false; break; - default: + case InputKeyMAX: break; } } else if(event.input.type == InputTypeRepeat) { @@ -376,7 +369,7 @@ int32_t metronome_app() { case InputKeyBack: processing = false; break; - default: + case InputKeyMAX: break; } } diff --git a/applications/plugins/minesweeper/README.md b/applications/plugins/minesweeper/README.md index 28176bd5e..eb1ebcad2 100644 --- a/applications/plugins/minesweeper/README.md +++ b/applications/plugins/minesweeper/README.md @@ -1,7 +1,5 @@ # Minesweeper -[Original Link](https://github.com/panki27/minesweeper) - This is a Minesweeper implementation for the Flipper Zero device. ![screenshot](img/screenshot.png) diff --git a/applications/plugins/minesweeper/minesweeper.c b/applications/plugins/minesweeper/minesweeper.c index fa9fdcc78..75fb32e56 100644 --- a/applications/plugins/minesweeper/minesweeper.c +++ b/applications/plugins/minesweeper/minesweeper.c @@ -217,10 +217,6 @@ static bool game_lost(Minesweeper* minesweeper_state) { dialog_message_set_icon(message, NULL, 0, 10); - // Set cursor to initial position - minesweeper_state->cursor_x = 0; - minesweeper_state->cursor_y = 0; - NotificationApp* notifications = furi_record_open(RECORD_NOTIFICATION); notification_message(notifications, &sequence_set_vibro_on); furi_record_close(RECORD_NOTIFICATION); @@ -476,7 +472,7 @@ int32_t minesweeper_app(void* p) { // Exit the plugin processing = false; break; - default: + case InputKeyMAX: break; } } else if(event.input.type == InputTypeLong) { @@ -495,7 +491,7 @@ int32_t minesweeper_app(void* p) { case InputKeyBack: processing = false; break; - default: + case InputKeyMAX: break; } } diff --git a/applications/plugins/nrf24scan/nrf24scan.c b/applications/plugins/nrf24scan/nrf24scan.c index da0093e8d..d142d1479 100644 --- a/applications/plugins/nrf24scan/nrf24scan.c +++ b/applications/plugins/nrf24scan/nrf24scan.c @@ -212,8 +212,11 @@ void write_to_log_file(Storage* storage, bool f_settings) { if(fl) { FURI_LOG_D(TAG, "Save to %s", furi_string_get_cstr(str)); if(save_to_new_log || f_settings) { - //if(what_to_do == 1) furi_string_printf(str, "%s\n", SettingsFld_Sniff); else furi_string_reset(str); - furi_string_printf( + if(what_to_do == 1) + furi_string_printf(str, "%s\n", SettingsFld_Sniff); + else + furi_string_reset(str); + furi_string_cat_printf( str, "%s %d\n%s %d\n%s %d\n", SettingsFld_Rate, @@ -231,9 +234,11 @@ void write_to_log_file(Storage* storage, bool f_settings) { NRF_CRC, SettingsFld_Payload, what_to_do == 1 ? NRF_Payload_sniff_min : NRF_Payload); - furi_string_cat_printf(str, "P0: "); - add_to_furi_str_hex_bytes(str, (char*)addrs.addr_P0, addrs.addr_len); - furi_string_cat(str, "\n"); + if(addrs.addr_count > 0) { + furi_string_cat_printf(str, "P0: "); + add_to_furi_str_hex_bytes(str, (char*)addrs.addr_P0, addrs.addr_len); + furi_string_cat(str, "\n"); + } if(addrs.addr_count > 1) { furi_string_cat_printf(str, "P1: "); add_to_furi_str_hex_bytes(str, (char*)addrs.addr_P1, addrs.addr_len); @@ -428,13 +433,14 @@ static uint8_t load_settings_file(Stream* file_stream) { if(err == 0 && a) adr->addr_count = a - '0' + 1; } else if(line_len >= 3 * 2) { // data if(!log_loaded) { + log_loaded = true; clear_log(); what_to_do = 0; - log_loaded = true; } if(log_arr_idx < MAX_LOG_RECORDS - 1) { - ConvertHexToArray( - line_ptr, APP->log_arr + log_arr_idx * LOG_REC_SIZE, LOG_REC_SIZE); + if(ConvertHexToArray( + line_ptr, APP->log_arr + log_arr_idx * LOG_REC_SIZE, LOG_REC_SIZE) > 0) + err = 0; log_arr_idx++; } } @@ -1013,7 +1019,7 @@ static void render_callback(Canvas* const canvas, void* ctx) { if(log_arr_idx && (*p & 0x80)) { // +RAW snprintf(screen_buf, sizeof(screen_buf), "Start read: "); add_to_str_hex_bytes(screen_buf, (char*)p + 2, (*(p + 1) & 0b11) + 2); - if(what_to_do == 3) strcpy(screen_buf + strlen(screen_buf) - 2, "* "); + if(what_to_do == 2) strcpy(screen_buf + strlen(screen_buf) - 2, "* "); } else snprintf( screen_buf, diff --git a/assets/resources/apps_data/nrf24scan/addresses.txt b/assets/resources/apps_data/nrf24scan/addresses.txt index 1934efbf4..e5bd3ed32 100644 --- a/assets/resources/apps_data/nrf24scan/addresses.txt +++ b/assets/resources/apps_data/nrf24scan/addresses.txt @@ -3,6 +3,7 @@ Ch: 2 ESB: 1 DPL: 0 CRC: 2 +Payload: 4 P0: C8C8C0 P1: C8C8C1 P2: C2 From 40700c1ffbeb927aaa3c3de018e668d3661bc6e2 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 01:56:07 -0500 Subject: [PATCH 4/6] Latest Release RM1224-0152-0.74.2-05f8cf2 on PATREON --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 6a9177677..1fe39ed62 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -16,7 +16,7 @@ Thank you to all the supporters! - Donations: ETH: `0xC32Ea488DBeCF95992A5C81BD411e56Bd418BC5f` - [Join THE Flipper Uncensored Discord](https://discord.gg/gF2bBUzAFe) -## Latest Updates - [PATREON: Latest Release RM1223-1104-0.74.2-0652595](https://www.patreon.com/posts/76286379) +## Latest Updates - [PATREON: Latest Release RM1224-0152-0.74.2-05f8cf2](https://www.patreon.com/posts/76312727) ## [BUILDS NOW AVAILABLE WITH STOCK, RM SELECT, RM SELECT + 18PLUS, RM MINIMAL (default) and RM 18PLUS ANIMATION SETS](https://www.patreon.com/RogueMaster/membership) From 5d9926be0a6c650011d8bf1858abd0893c93c33f Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 06:59:56 -0500 Subject: [PATCH 5/6] nrf24 fix --- applications/plugins/nrf24scan/nrf24scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/plugins/nrf24scan/nrf24scan.c b/applications/plugins/nrf24scan/nrf24scan.c index d142d1479..6d8e5b984 100644 --- a/applications/plugins/nrf24scan/nrf24scan.c +++ b/applications/plugins/nrf24scan/nrf24scan.c @@ -517,13 +517,14 @@ static void prepare_nrf24(bool fsend_packet) { } if(what_to_do == 1) { // SNIFF payload = 32; - nrf24_write_reg(nrf24_HANDLE, REG_CONFIG, 0x70); // Mask all interrupts + nrf24_write_reg(nrf24_HANDLE, REG_CONFIG, 0x70); // Mask all interrupts, NO CRC nrf24_write_reg(nrf24_HANDLE, REG_SETUP_RETR, 0); // Automatic Retransmission nrf24_write_reg(nrf24_HANDLE, REG_EN_AA, 0); // Auto acknowledgement nrf24_write_reg( nrf24_HANDLE, REG_FEATURE, 0); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload + nrf24_write_reg(nrf24_HANDLE, REG_RF_CH, NRF_channel); } else if(setup_from_log) { // Scan nrf24_write_reg( nrf24_HANDLE, From 92e8ab89483f952f72bae0dd6c9455c0fa649c79 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 24 Dec 2022 07:04:11 -0500 Subject: [PATCH 6/6] Latest Release RM1224-0701-0.74.2-5d9926b on PATREON --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 1fe39ed62..db6987ea1 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -16,7 +16,7 @@ Thank you to all the supporters! - Donations: ETH: `0xC32Ea488DBeCF95992A5C81BD411e56Bd418BC5f` - [Join THE Flipper Uncensored Discord](https://discord.gg/gF2bBUzAFe) -## Latest Updates - [PATREON: Latest Release RM1224-0152-0.74.2-05f8cf2](https://www.patreon.com/posts/76312727) +## Latest Updates - [PATREON: Latest Release RM1224-0701-0.74.2-5d9926b](https://www.patreon.com/posts/76318937) ## [BUILDS NOW AVAILABLE WITH STOCK, RM SELECT, RM SELECT + 18PLUS, RM MINIMAL (default) and RM 18PLUS ANIMATION SETS](https://www.patreon.com/RogueMaster/membership)