Skip to content

Commit

Permalink
ESP Flasher: Spring cleaning
Browse files Browse the repository at this point in the history
remove s2 wardriver and s3/wroom airtag scanner

also change board type selection to be more user friendly, similar idea to what unleashed has
  • Loading branch information
Willy-JL committed Nov 6, 2024
1 parent 68bb084 commit 091c236
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 63 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
73 changes: 10 additions & 63 deletions esp_flasher/scenes/esp_flasher_scene_quick.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

// Marauder firmware source - https://github.com/justcallmekoko/ESP32Marauder
// Wardriver firmware source - https://github.com/Sil333033/flipperzero-wardriver
// AirTag Scanner firmware source - https://github.com/MatthewKuKanich/ESP32-AirTag-Scanner
// Black Magic firmware source - https://github.com/flipperdevices/blackmagic-esp32-s2
// BlackMagic firmware source - https://github.com/flipperdevices/blackmagic-esp32-s2

// DO NOT use as an example, you should split into different scene files for each screen
// DO NOT use this code as an example, you should split into different scene files for each screen
// To keep in a single file, this is setup in an unusual and confusing way
// You can find more info in comments throughout

Expand All @@ -16,28 +15,22 @@ enum QuickState {
QuickStart,
QuickS2Boot,
QuickS2Boot_Marauder,
QuickS2Boot_Wardriver,
QuickS2Boot_Blackmagic,
QuickWROOMBoot,
QuickWROOMBoot_Marauder,
QuickWROOMBoot_Wardriver,
QuickWROOMBoot_Airtag,
QuickS3Boot,
QuickS3Boot_Marauder,
QuickS3Boot_Wardriver,
QuickS3Boot_Airtag,
QuickWROOM,
QuickWROOM_Marauder,
QuickWROOM_Wardriver,
QuickWROOM_Airtag,
QuickS2,
QuickS2_Marauder,
QuickS2_Wardriver,
QuickS2_Blackmagic,
QuickS3,
QuickS3_Marauder,
QuickS3_Wardriver,
QuickS3_Airtag,
};

void esp_flasher_scene_quick_submenu_callback(void* context, uint32_t index) {
Expand All @@ -64,21 +57,25 @@ void esp_flasher_scene_quick_on_enter(void* context) {
case QuickWROOM:
case QuickS2:
case QuickS3:
submenu_set_header(submenu, "Choose Board:");
submenu_set_header(submenu, "Choose ESP32 Type:");
submenu_add_item(
submenu,
"WiFi Dev / RL S2 / Xeon",
"Flipper WiFi Devboard",
QuickS2Boot,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"SCE Multi-Fucc",
"WROOM (auto bootloader)",
QuickWROOMBoot,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu, "RL ESP32-S3", QuickS3Boot, esp_flasher_scene_quick_submenu_callback, app);
submenu,
"S3 (auto bootloader)",
QuickS3Boot,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"Other ESP32-WROOM",
Expand All @@ -91,10 +88,8 @@ void esp_flasher_scene_quick_on_enter(void* context) {
submenu, "Other ESP32-S3", QuickS3, esp_flasher_scene_quick_submenu_callback, app);
break;
case QuickS2Boot_Marauder:
case QuickS2Boot_Wardriver:
case QuickS2Boot_Blackmagic:
case QuickS2_Marauder:
case QuickS2_Wardriver:
case QuickS2_Blackmagic:
submenu_set_header(submenu, "Choose Firmware:");
submenu_add_item(
Expand All @@ -103,12 +98,6 @@ void esp_flasher_scene_quick_on_enter(void* context) {
state > QuickS2 ? QuickS2_Marauder : QuickS2Boot_Marauder,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"Wardriver",
state > QuickS2 ? QuickS2_Wardriver : QuickS2Boot_Wardriver,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"Black Magic",
Expand All @@ -118,10 +107,8 @@ void esp_flasher_scene_quick_on_enter(void* context) {
break;
case QuickWROOMBoot_Marauder:
case QuickWROOMBoot_Wardriver:
case QuickWROOMBoot_Airtag:
case QuickWROOM_Marauder:
case QuickWROOM_Wardriver:
case QuickWROOM_Airtag:
submenu_set_header(submenu, "Choose Firmware:");
submenu_add_item(
submenu,
Expand All @@ -135,19 +122,11 @@ void esp_flasher_scene_quick_on_enter(void* context) {
state > QuickWROOM ? QuickWROOM_Wardriver : QuickWROOMBoot_Wardriver,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"AirTag Scanner",
state > QuickWROOM ? QuickWROOM_Airtag : QuickWROOMBoot_Airtag,
esp_flasher_scene_quick_submenu_callback,
app);
break;
case QuickS3Boot_Marauder:
case QuickS3Boot_Wardriver:
case QuickS3Boot_Airtag:
case QuickS3_Marauder:
case QuickS3_Wardriver:
case QuickS3_Airtag:
submenu_set_header(submenu, "Choose Firmware:");
submenu_add_item(
submenu,
Expand All @@ -161,12 +140,6 @@ void esp_flasher_scene_quick_on_enter(void* context) {
state > QuickS3 ? QuickS3_Wardriver : QuickS3Boot_Wardriver,
esp_flasher_scene_quick_submenu_callback,
app);
submenu_add_item(
submenu,
"AirTag Scanner",
state > QuickS3 ? QuickS3_Airtag : QuickS3Boot_Airtag,
esp_flasher_scene_quick_submenu_callback,
app);
break;
default:
break;
Expand Down Expand Up @@ -215,13 +188,6 @@ bool esp_flasher_scene_quick_on_event(void* context, SceneManagerEvent event) {
firm = APP_DATA_PATH("assets/marauder/s2/esp32_marauder.flipper.bin");
break;

case QuickS2Boot_Wardriver:
enter_bootloader = true;
/* fallthrough */
case QuickS2_Wardriver:
boot = APP_DATA_PATH("assets/wardriver/f0-wardrive-s2.bin");
break;

case QuickS2Boot_Blackmagic:
enter_bootloader = true;
/* fallthrough */
Expand All @@ -248,15 +214,6 @@ bool esp_flasher_scene_quick_on_event(void* context, SceneManagerEvent event) {
boot = APP_DATA_PATH("assets/wardriver/f0-wardrive-wroom.bin");
break;

case QuickWROOMBoot_Airtag:
enter_bootloader = true;
/* fallthrough */
case QuickWROOM_Airtag:
boot = APP_DATA_PATH("assets/airtag/wroom/airtag_scanner.ino.bootloader.bin");
part = APP_DATA_PATH("assets/airtag/airtag_scanner.ino.partitions.bin");
firm = APP_DATA_PATH("assets/airtag/wroom/airtag_scanner.ino.bin");
break;

case QuickS3Boot_Marauder:
enter_bootloader = true;
/* fallthrough */
Expand All @@ -276,16 +233,6 @@ bool esp_flasher_scene_quick_on_event(void* context, SceneManagerEvent event) {
boot = APP_DATA_PATH("assets/wardriver/f0-wardrive-s3.bin");
break;

case QuickS3Boot_Airtag:
enter_bootloader = true;
/* fallthrough */
case QuickS3_Airtag:
s3 = true;
boot = APP_DATA_PATH("assets/airtag/s3/airtag_scanner.ino.bootloader.bin");
part = APP_DATA_PATH("assets/airtag/airtag_scanner.ino.partitions.bin");
firm = APP_DATA_PATH("assets/airtag/s3/airtag_scanner.ino.bin");
break;

default:
consumed = false;
return consumed;
Expand Down

0 comments on commit 091c236

Please sign in to comment.