From 458254b5dbdbfb817cdde153c6588383aebbf560 Mon Sep 17 00:00:00 2001 From: zRCrackiiN <124148929+zRCrackiiN@users.noreply.github.com> Date: Sat, 24 Feb 2024 18:49:17 +1100 Subject: [PATCH 1/2] Add files via upload --- esp32_marauder/Display.cpp | 3 + esp32_marauder/MenuFunctions.cpp | 3 + esp32_marauder/WiFiScan.cpp | 39 +++++- esp32_marauder/WiFiScan.h | 4 + esp32_marauder/configs.h | 219 ++++++++++++++++++++++++++++-- esp32_marauder/cydLED.cpp | 70 ++++++++++ esp32_marauder/cydLED.h | 27 ++++ esp32_marauder/esp32_marauder.ino | 12 ++ 8 files changed, 365 insertions(+), 12 deletions(-) create mode 100644 esp32_marauder/cydLED.cpp create mode 100644 esp32_marauder/cydLED.h diff --git a/esp32_marauder/Display.cpp b/esp32_marauder/Display.cpp index da835e44c..5d8007a1e 100644 --- a/esp32_marauder/Display.cpp +++ b/esp32_marauder/Display.cpp @@ -35,6 +35,9 @@ void Display::RunSetup() #ifdef TFT_SHIELD uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield //Serial.println(F("Using TFT Shield")); + #elif defined(TFT_SHIELD_CYD) + uint16_t calData[5] = { 350, 3465, 188, 3431, 2 }; // tft.setRotation(0); // Portrait with TFT Shield + //Serial.println(F("Using TFT Shield")); #else if defined(TFT_DIY) uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT //Serial.println(F("Using TFT DIY")); diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp index b066c5ba0..a3c87587c 100644 --- a/esp32_marauder/MenuFunctions.cpp +++ b/esp32_marauder/MenuFunctions.cpp @@ -1146,6 +1146,9 @@ void MenuFunctions::orientDisplay() #ifdef HAS_ILI9341 #ifdef TFT_SHIELD uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield + #elif defined(TFT_SHIELD_CYD) + uint16_t calData[5] = { 350, 3465, 188, 3431, 2 }; // tft.setRotation(0); // Portrait with TFT Shield + //Serial.println(F("Using TFT Shield")); #else if defined(TFT_DIY) uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT #endif diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index 01f4831bf..90866c8d0 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -645,6 +645,8 @@ void WiFiScan::startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_ this->wifi_initialized = true; #ifdef MARAUDER_FLIPPER flipper_led.attackLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.attackLED(); #elif defined(XIAO_ESP32_S3) xiao_led.attackLED(); #elif defined(MARAUDER_M5STICKC) @@ -670,6 +672,8 @@ bool WiFiScan::shutdownWiFi() { #ifdef MARAUDER_FLIPPER flipper_led.offLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.offLED(); #elif defined(XIAO_ESP32_S3) xiao_led.offLED(); #elif defined(MARAUDER_M5STICKC) @@ -697,6 +701,8 @@ bool WiFiScan::shutdownBLE() { #ifdef MARAUDER_FLIPPER flipper_led.offLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.offLED(); #elif defined(XIAO_ESP32_S3) xiao_led.offLED(); #elif defined(MARAUDER_M5STICKC) @@ -958,6 +964,8 @@ void WiFiScan::RunEvilPortal(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1001,6 +1009,8 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1360,6 +1370,11 @@ void WiFiScan::RunInfo() display_obj.tft.setFreeFont(NULL); display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3); display_obj.tft.setTextSize(1); +// +// +// +// +// display_obj.tft.setTextColor(TFT_CYAN); display_obj.tft.println(text_table4[20]); display_obj.tft.println(text_table4[21] + display_obj.version_number); @@ -1424,6 +1439,8 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color) { #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1503,6 +1520,8 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color) { #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1644,6 +1663,8 @@ void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1837,6 +1858,8 @@ void WiFiScan::RunBeaconScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1896,6 +1919,8 @@ void WiFiScan::RunStationScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1940,6 +1965,8 @@ void WiFiScan::RunRawScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -1986,6 +2013,8 @@ void WiFiScan::RunDeauthScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -2045,6 +2074,8 @@ void WiFiScan::RunProbeScan(uint8_t scan_mode, uint16_t color) #ifdef MARAUDER_FLIPPER flipper_led.sniffLED(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.sniffLED(); #elif defined(XIAO_ESP32_S3) xiao_led.sniffLED(); #elif defined(MARAUDER_M5STICKC) @@ -4072,7 +4103,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t // Channel - button pressed if (b == 4) { if (set_channel > 1) { - Serial.println("Shit channel down"); + Serial.println("Shift channel down"); set_channel--; delay(70); display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); @@ -4086,7 +4117,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t // Channel + button pressed else if (b == 5) { if (set_channel < MAX_CHANNEL) { - Serial.println("Shit channel up"); + Serial.println("Shift channel up"); set_channel++; delay(70); display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); @@ -4280,7 +4311,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t // Channel - button pressed else if (b == 4) { if (set_channel > 1) { - Serial.println("Shit channel down"); + Serial.println("Shift channel down"); set_channel--; delay(70); display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); @@ -4296,7 +4327,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t // Channel + button pressed else if (b == 5) { if (set_channel < MAX_CHANNEL) { - Serial.println("Shit channel up"); + Serial.println("Shift channel up"); set_channel++; delay(70); display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); diff --git a/esp32_marauder/WiFiScan.h b/esp32_marauder/WiFiScan.h index a43c29b7c..fdc8dc381 100644 --- a/esp32_marauder/WiFiScan.h +++ b/esp32_marauder/WiFiScan.h @@ -37,6 +37,8 @@ #include "Assets.h" #ifdef MARAUDER_FLIPPER #include "flipperLED.h" +#elif defined(CHEAP_YELLOW_DISPLAY) + #include "cydLED.h" #elif defined(XIAO_ESP32_S3) #include "xiaoLED.h" #elif defined(MARAUDER_M5STICKC) @@ -115,6 +117,8 @@ extern Buffer buffer_obj; extern Settings settings_obj; #ifdef MARAUDER_FLIPPER extern flipperLED flipper_led; +#elif defined(CHEAP_YELLOW_DISPLAY) + extern cydLED cyd_LED; #elif defined(XIAO_ESP32_S3) extern xiaoLED xiao_led; #elif defined(MARAUDER_M5STICKC) diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h index 63c6cbb7f..3832b1c8c 100644 --- a/esp32_marauder/configs.h +++ b/esp32_marauder/configs.h @@ -4,11 +4,17 @@ #define configs_h - #define POLISH_POTATO + #define POLISH_POTATO // nice joke average virginian + + + //Indicates that it must redirect the stream with the captured packets to serial (1) + //If not defined, will write packages to SD card if supported + //#define WRITE_PACKETS_SERIAL //// BOARD TARGETS + #define CHEAP_YELLOW_DISPLAY //#define MARAUDER_M5STICKC - #define MARAUDER_MINI + //#define MARAUDER_MINI //#define MARAUDER_V4 //#define MARAUDER_V6 //#define MARAUDER_V6_1 @@ -18,12 +24,15 @@ //#define ESP32_LDDB //#define MARAUDER_DEV_BOARD_PRO //#define XIAO_ESP32_S3 + //// END BOARD TARGETS #define MARAUDER_VERSION "v0.13.8" //// HARDWARE NAMES - #ifdef MARAUDER_M5STICKC + #ifdef CHEAP_YELLOW_DISPLAY + #define HARDWARE_NAME "Cheap Yellow Display" + #elif defined(MARAUDER_M5STICKC) #define HARDWARE_NAME "M5Stick-C Plus" #elif defined(MARAUDER_MINI) #define HARDWARE_NAME "Marauder Mini" @@ -49,7 +58,24 @@ //// END HARDWARE NAMES - //// BOARD FEATURES + //// BOARD FEATURES + + //// --CHEAP YELLOW DISPLAY ADDED BY zR_CrackiiN-- + #ifdef CHEAP_YELLOW_DISPLAY + //#define FLIPPER_ZERO_HAT + //#define HAS_BATTERY + #define HAS_BT + //#define HAS_BUTTONS + //#define HAS_NEOPIXEL_LED + #define HAS_PWR_MGMT + #define HAS_SCREEN + #define HAS_SD + #define USE_SD + //#define HAS_TEMP_SENSOR + #define HAS_GPS + #define HAS_3PIN_LED + #endif + #ifdef MARAUDER_M5STICKC //#define FLIPPER_ZERO_HAT #define HAS_BATTERY @@ -143,8 +169,10 @@ //#define HAS_PWR_MGMT //#define HAS_SCREEN #define HAS_GPS +// #define HAS_SD #define USE_SD +// //#define HAS_TEMP_SENSOR #endif @@ -189,6 +217,20 @@ //#define HAS_GPS #endif //// END BOARD FEATURES + // + // + // + // + // + // + // + // + // + // + // + // + // + // //// POWER MANAGEMENT #ifdef HAS_PWR_MGMT @@ -237,7 +279,122 @@ //// END BUTTON DEFINITIONS //// DISPLAY DEFINITIONS - #ifdef HAS_SCREEN + #ifdef HAS_SCREEN + + #ifdef CHEAP_YELLOW_DISPLAY + #define SCREEN_CHAR_WIDTH 40 + #define HAS_ILI9341 + #define BANNER_TEXT_SIZE 2 + + #ifndef TFT_WIDTH + #define TFT_WIDTH 240 + #endif + + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TFT_SHIELD_CYD + + #define SCREEN_WIDTH TFT_WIDTH + #define SCREEN_HEIGHT TFT_HEIGHT + #define HEIGHT_1 TFT_WIDTH + #define WIDTH_1 TFT_HEIGHT + #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font + #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled + #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen) + #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen) + #define YMAX 320 // Bottom of screen area + #define minimum(a,b) (((a) < (b)) ? (a) : (b)) + //#define MENU_FONT NULL + #define MENU_FONT &FreeMono9pt7b // Winner + //#define MENU_FONT &FreeMonoBold9pt7b + //#define MENU_FONT &FreeSans9pt7b + //#define MENU_FONT &FreeSansBold9pt7b + #define BUTTON_SCREEN_LIMIT 12 + #define BUTTON_ARRAY_LEN 12 + #define STATUS_BAR_WIDTH 16 + #define LVGL_TICK_PERIOD 6 + + #define FRAME_X 100 + #define FRAME_Y 64 + #define FRAME_W 120 + #define FRAME_H 50 + + // Red zone size + #define REDBUTTON_X FRAME_X + #define REDBUTTON_Y FRAME_Y + #define REDBUTTON_W (FRAME_W/2) + #define REDBUTTON_H FRAME_H + + // Green zone size + #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W) + #define GREENBUTTON_Y FRAME_Y + #define GREENBUTTON_W (FRAME_W/2) + #define GREENBUTTON_H FRAME_H + + #define STATUSBAR_COLOR 0x4A49 + + #define KIT_LED_BUILTIN 13 + #endif + + #if defined(MARAUDER_V6) || defined(MARAUDER_V6_1) + #define SCREEN_CHAR_WIDTH 40 + #define HAS_ILI9341 + + #define BANNER_TEXT_SIZE 2 + + #ifndef TFT_WIDTH + #define TFT_WIDTH 240 + #endif + + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TFT_DIY + + #define SCREEN_WIDTH TFT_WIDTH + #define SCREEN_HEIGHT TFT_HEIGHT + #define HEIGHT_1 TFT_WIDTH + #define WIDTH_1 TFT_HEIGHT + #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font + #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled + #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen) + #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen) + #define YMAX 320 // Bottom of screen area + #define minimum(a,b) (((a) < (b)) ? (a) : (b)) + //#define MENU_FONT NULL + #define MENU_FONT &FreeMono9pt7b // Winner + //#define MENU_FONT &FreeMonoBold9pt7b + //#define MENU_FONT &FreeSans9pt7b + //#define MENU_FONT &FreeSansBold9pt7b + #define BUTTON_SCREEN_LIMIT 12 + #define BUTTON_ARRAY_LEN 12 + #define STATUS_BAR_WIDTH 16 + #define LVGL_TICK_PERIOD 6 + + #define FRAME_X 100 + #define FRAME_Y 64 + #define FRAME_W 120 + #define FRAME_H 50 + + // Red zone size + #define REDBUTTON_X FRAME_X + #define REDBUTTON_Y FRAME_Y + #define REDBUTTON_W (FRAME_W/2) + #define REDBUTTON_H FRAME_H + + // Green zone size + #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W) + #define GREENBUTTON_Y FRAME_Y + #define GREENBUTTON_W (FRAME_W/2) + #define GREENBUTTON_H FRAME_H + + #define STATUSBAR_COLOR 0x4A49 + + #define KIT_LED_BUILTIN 13 + #endif #ifdef MARAUDER_M5STICKC #define SCREEN_CHAR_WIDTH 40 @@ -552,6 +709,25 @@ //// END DISPLAY DEFINITIONS //// MENU DEFINITIONS + #ifdef CHEAP_YELLOW_DISPLAY + #define BANNER_TIME 100 + + #define COMMAND_PREFIX "!" + + // Keypad start position, key sizes and spacing + #define KEY_X 120 // Centre of key + #define KEY_Y 50 + #define KEY_W 240 // Width and height + #define KEY_H 22 + #define KEY_SPACING_X 0 // X and Y gap + #define KEY_SPACING_Y 1 + #define KEY_TEXTSIZE 1 // Font size multiplier + #define ICON_W 22 + #define ICON_H 22 + #define BUTTON_PADDING 22 + //#define BUTTON_ARRAY_LEN 5 + #endif + #ifdef MARAUDER_V4 #define BANNER_TIME 100 @@ -648,6 +824,18 @@ //// SD DEFINITIONS #if defined(USE_SD) + // + // + // + // + // + // + // + // + // + #ifdef CHEAP_YELLOW_DISPLAY + #define SD_CS 5 + #endif #ifdef MARAUDER_V4 #define SD_CS 12 @@ -722,6 +910,8 @@ // These values are in bytes #ifdef MARAUDER_M5STICKC #define MEM_LOWER_LIM 20000 + #elif defined(CHEAP_YELLOW_DISPLAY) + #define MEM_LOWER_LIM 20000 #elif defined(MARAUDER_MINI) #define MEM_LOWER_LIM 20000 #elif defined(MARAUDER_V4) @@ -760,6 +950,8 @@ //// EVIL PORTAL STUFF #ifdef MARAUDER_M5STICKC #define MAX_HTML_SIZE 11400 + #elif defined(CHEAP_YELLOW_DISPLAY) + #define MAX_HTML_SIZE 11400 #elif defined(MARAUDER_MINI) #define MAX_HTML_SIZE 11400 #elif defined(MARAUDER_V4) @@ -790,10 +982,15 @@ #define GPS_TX 4 #define GPS_RX 13 #define mac_history_len 512 - #elif defined(MARAUDER_V4) + #elif defined(CHEAP_YELLOW_DISPLAY) + #define GPS_SERIAL_INDEX 2 + #define GPS_TX 1 + #define GPS_RX 3 + #define mac_history_len 512 + #elif defined(MARAUDER_V4) #define GPS_SERIAL_INDEX 2 - #define GPS_TX 4 - #define GPS_RX 13 + #define GPS_TX 1 + #define GPS_RX 3 #define mac_history_len 512 #elif defined(MARAUDER_KIT) #define GPS_SERIAL_INDEX 2 @@ -811,7 +1008,11 @@ #define GPS_RX 22 #define mac_history_len 512 #elif defined(MARAUDER_FLIPPER) + // + // + // #define GPS_SERIAL_INDEX 1 + // #define GPS_TX 9 #define GPS_RX 21 #define mac_history_len 512 @@ -829,6 +1030,8 @@ //// MARAUDER TITLE STUFF #ifdef MARAUDER_V4 #define MARAUDER_TITLE_BYTES 13578 + #elif defined(CHEAP_YELLOW_DISPLAY) + #define MARAUDER_TITLE_BYTES 13578 #elif defined(MARAUDER_V6) || defined(MARAUDER_V6_1) #define MARAUDER_TITLE_BYTES 13578 #elif defined(MARAUDER_KIT) diff --git a/esp32_marauder/cydLED.cpp b/esp32_marauder/cydLED.cpp new file mode 100644 index 000000000..b38a88a05 --- /dev/null +++ b/esp32_marauder/cydLED.cpp @@ -0,0 +1,70 @@ +#include "cydLED.h" + +// RGB LED INFO +// Active low control +// LOW = On +// HIGH = OFF +// Pinout +// IO4 Red +// IO16 Green +// IO17 Blue + +void cydLED::RunSetup() { + pinMode(B_PIN, OUTPUT); + pinMode(G_PIN, OUTPUT); + pinMode(R_PIN, OUTPUT); + + if (!settings_obj.loadSetting("EnableLED")) { + digitalWrite(B_PIN, LOW); + digitalWrite(G_PIN, LOW); + digitalWrite(R_PIN, LOW); + return; + } + + delay(50); + + digitalWrite(B_PIN, LOW); + delay(500); + digitalWrite(B_PIN, HIGH); + digitalWrite(G_PIN, LOW); + delay(500); + digitalWrite(G_PIN, HIGH); + digitalWrite(R_PIN, LOW); + delay(500); + digitalWrite(R_PIN, HIGH); +} + +void cydLED::attackLED() { + if (!settings_obj.loadSetting("EnableLED")) + return; + + digitalWrite(B_PIN, HIGH); + digitalWrite(G_PIN, HIGH); + digitalWrite(R_PIN, HIGH); + delay(10); + digitalWrite(R_PIN, LOW); +} + +void cydLED::sniffLED() { + if (!settings_obj.loadSetting("EnableLED")) + return; + + digitalWrite(B_PIN, HIGH); + digitalWrite(G_PIN, HIGH); + digitalWrite(R_PIN, HIGH); + delay(10); + digitalWrite(B_PIN, LOW); +} + +void cydLED::offLED() { + if (!settings_obj.loadSetting("EnableLED")) + return; + + digitalWrite(B_PIN, HIGH); + digitalWrite(G_PIN, HIGH); + digitalWrite(R_PIN, HIGH); +} + +void cydLED::main() { + // do nothing +} \ No newline at end of file diff --git a/esp32_marauder/cydLED.h b/esp32_marauder/cydLED.h new file mode 100644 index 000000000..7d81ef1fd --- /dev/null +++ b/esp32_marauder/cydLED.h @@ -0,0 +1,27 @@ +#pragma once + +#ifndef cydLED_h +#define cydLED_h + +#include "configs.h" +#include "settings.h" + +#include + +#define B_PIN 17 +#define G_PIN 16 +#define R_PIN 4 + +extern Settings settings_obj; + +class cydLED { + + public: + void RunSetup(); + void main(); + void attackLED(); + void sniffLED(); + void offLED(); +}; + +#endif diff --git a/esp32_marauder/esp32_marauder.ino b/esp32_marauder/esp32_marauder.ino index d5ce728ce..827e7f0e1 100644 --- a/esp32_marauder/esp32_marauder.ino +++ b/esp32_marauder/esp32_marauder.ino @@ -41,6 +41,8 @@ https://www.online-utility.org/image/convert/to/XBM #include "xiaoLED.h" #elif defined(MARAUDER_M5STICKC) #include "stickcLED.h" +#elif defined(CHEAP_YELLOW_DISPLAY) + #include "cydLED.h" #else #include "LedInterface.h" #endif @@ -121,6 +123,8 @@ CommandLine cli_obj; #ifdef MARAUDER_FLIPPER flipperLED flipper_led; +#elif defined(CHEAP_YELLOW_DISPLAY) + cydLED cyd_LED; #elif defined(XIAO_ESP32_S3) xiaoLED xiao_led; #elif defined(MARAUDER_M5STICKC) @@ -229,6 +233,10 @@ void setup() #ifndef MARAUDER_MINI display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2); #endif + + #ifdef CHEAP_YELLOW_DISPLAY + display_obj.tft.drawCentreString(display_obj.version_number, 120, 305, 2); + #endif #ifdef MARAUDER_MINI display_obj.tft.drawCentreString(display_obj.version_number, TFT_WIDTH/2, TFT_HEIGHT, 1); @@ -331,6 +339,8 @@ void setup() // Do some LED stuff #ifdef MARAUDER_FLIPPER flipper_led.RunSetup(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.RunSetup(); #elif defined(XIAO_ESP32_S3) xiao_led.RunSetup(); #elif defined(MARAUDER_M5STICKC) @@ -445,6 +455,8 @@ void loop() } #ifdef MARAUDER_FLIPPER flipper_led.main(); + #elif defined(CHEAP_YELLOW_DISPLAY) + cyd_LED.main(); #elif defined(XIAO_ESP32_S3) xiao_led.main(); #elif defined(MARAUDER_M5STICKC) From 860d141e0937af08ea699284426822670c385a1d Mon Sep 17 00:00:00 2001 From: zRCrackiiN <124148929+zRCrackiiN@users.noreply.github.com> Date: Mon, 26 Feb 2024 23:26:42 +1100 Subject: [PATCH 2/2] Update esp32_marauder.ino comm out second version info for different splash screens --- esp32_marauder/esp32_marauder.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/esp32_marauder/esp32_marauder.ino b/esp32_marauder/esp32_marauder.ino index 827e7f0e1..526c76f5e 100644 --- a/esp32_marauder/esp32_marauder.ino +++ b/esp32_marauder/esp32_marauder.ino @@ -234,9 +234,10 @@ void setup() display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2); #endif - #ifdef CHEAP_YELLOW_DISPLAY - display_obj.tft.drawCentreString(display_obj.version_number, 120, 305, 2); - #endif +////for future funnies +// #ifdef CHEAP_YELLOW_DISPLAY +// display_obj.tft.drawCentreString(display_obj.version_number, 120, 305, 2); +// #endif #ifdef MARAUDER_MINI display_obj.tft.drawCentreString(display_obj.version_number, TFT_WIDTH/2, TFT_HEIGHT, 1);