Add Marauder Mini v3 configuration

This commit is contained in:
Just Call Me Koko
2026-02-02 18:28:06 -05:00
parent 29b6783168
commit e9b037e087
5 changed files with 247 additions and 35 deletions

View File

@@ -16,7 +16,7 @@
//#define GPS_NMEA_SCRNWRAP true //default:true, except on MARAUDER_MINI where false
//#define GPS_NMEA_MAXQUEUE 30 //default:30 messages max in queue
#ifdef MARAUDER_MINI
#if defined(MARAUDER_MINI) || defined(MARAUDER_MINI_V3)
#ifndef GPS_NMEA_SCRNWRAP
#define GPS_NMEA_SCRNWRAP false
#endif

View File

@@ -463,10 +463,19 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN)) {
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#else
if (wifi_scan_obj.dual_band_channel_index < DUAL_BAND_CHANNELS - 1)
wifi_scan_obj.dual_band_channel_index++;
else
wifi_scan_obj.dual_band_channel_index = 0;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channel[wifi_scan_obj.dual_band_channel_index]);
#endif
}
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
#ifndef HAS_DUAL_BAND
@@ -519,10 +528,19 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN)) {
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#else
if (wifi_scan_obj.dual_band_channel_index > 0)
wifi_scan_obj.dual_band_channel_index--;
else
wifi_scan_obj.dual_band_channel_index = DUAL_BAND_CHANNELS - 1;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channels[wifi_scan_obj.dual_band_channel_index]);
#endif
}
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
#ifndef HAS_DUAL_BAND
@@ -631,10 +649,19 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN)) {
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#else
if (wifi_scan_obj.dual_band_channel_index < DUAL_BAND_CHANNELS - 1)
wifi_scan_obj.dual_band_channel_index++;
else
wifi_scan_obj.dual_band_channel_index = 0;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channels[wifi_scan_obj.dual_band_channel_index]);
#endif
}
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
#ifndef HAS_DUAL_BAND
@@ -695,10 +722,19 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN)) {
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#else
if (wifi_scan_obj.dual_band_channel_index > 0)
wifi_scan_obj.dual_band_channel_index--;
else
wifi_scan_obj.dual_band_channel_index = DUAL_BAND_CHANNELS - 1;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channels[wifi_scan_obj.dual_band_channel_index]);
#endif
}
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
#ifndef HAS_DUAL_BAND
@@ -722,10 +758,19 @@ void MenuFunctions::main(uint32_t currentTime)
if (this->isKeyPressed('/')) {
#endif
if (wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) {
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel < 14)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
else
wifi_scan_obj.changeChannel(1);
#else
if (wifi_scan_obj.dual_band_channel_index < DUAL_BAND_CHANNELS - 1)
wifi_scan_obj.dual_band_channel_index++;
else
wifi_scan_obj.dual_band_channel_index = 0;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channels[wifi_scan_obj.dual_band_channel_index]);
#endif
}
}
#endif
@@ -737,10 +782,19 @@ void MenuFunctions::main(uint32_t currentTime)
if (this->isKeyPressed(',')) {
#endif
if (wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) {
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#ifndef HAS_DUAL_BAND
if (wifi_scan_obj.set_channel > 1)
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
else
wifi_scan_obj.changeChannel(14);
#else
if (wifi_scan_obj.dual_band_channel_index > 0)
wifi_scan_obj.dual_band_channel_index--;
else
wifi_scan_obj.dual_band_channel_index = DUAL_BAND_CHANNELS - 1;
wifi_scan_obj.changeChannel(wifi_scan_obj.dual_band_channels[wifi_scan_obj.dual_band_channel_index]);
#endif
}
}
#endif
@@ -864,7 +918,7 @@ void MenuFunctions::updateStatusBar()
bool status_changed = false;
#if defined(MARAUDER_MINI) || defined(MARAUDER_M5STICKC) || defined(MARAUDER_REV_FEATHER) || defined(MARAUDER_CARDPUTER)
#if defined(MARAUDER_MINI) || defined(MARAUDER_M5STICKC) || defined(MARAUDER_REV_FEATHER) || defined(MARAUDER_CARDPUTER) || defined(MARAUDER_MINI_V3)
display_obj.tft.setFreeFont(NULL);
#endif
@@ -918,7 +972,7 @@ void MenuFunctions::updateStatusBar()
if ((current_channel != wifi_scan_obj.old_channel) || (status_changed)) {
wifi_scan_obj.old_channel = current_channel;
#if defined(MARAUDER_MINI) || defined(MARAUDER_M5STICKC) || defined(MARAUDER_REV_FEATHER) || defined(MARAUDER_CARDPUTER)
#if defined(MARAUDER_MINI) || defined(MARAUDER_M5STICKC) || defined(MARAUDER_REV_FEATHER) || defined(MARAUDER_CARDPUTER) || defined(MARAUDER_MINI_V3)
display_obj.tft.fillRect(TFT_WIDTH/4, 0, CHAR_WIDTH * 6, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
#elif defined(HAS_DUAL_BAND)
display_obj.tft.fillRect(50, 0, (CHAR_WIDTH / 2) * 8, STATUS_BAR_WIDTH, STATUSBAR_COLOR);

View File

@@ -282,10 +282,6 @@ class WiFiScan
uint8_t ap_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
uint8_t sta_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
uint8_t dual_band_channels[DUAL_BAND_CHANNELS] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 149, 153, 157, 161, 165, 169, 173, 177};
uint8_t dual_band_channel_index = 0;
// Settings
uint mac_history_cursor = 0;
uint8_t channel_hop_delay = 1;
@@ -665,6 +661,10 @@ class WiFiScan
static MacEntry mac_entries[mac_history_len_half];
static uint8_t mac_entry_state[mac_history_len_half];
uint8_t dual_band_channels[DUAL_BAND_CHANNELS] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 149, 153, 157, 161, 165, 169, 173, 177};
uint8_t dual_band_channel_index = 0;
// Stuff for RAW stats
uint32_t mgmt_frames = 0;
uint32_t data_frames = 0;

View File

@@ -32,6 +32,7 @@
//#define MARAUDER_C5
//#define MARAUDER_CARDPUTER
//#define MARAUDER_V8
//#define MARAUDER_MINI_V3
//// END BOARD TARGETS
#define MARAUDER_VERSION "v1.10.2"
@@ -89,6 +90,8 @@
#define HARDWARE_NAME "ESP32-C5 DevKit"
#elif defined(MARAUDER_V8)
#define HARDWARE_NAME "Marauder v8"
#elif defined(MARAUDER_MINI_V3)
#define HARDWARE_NAME "Marauder Mini v3"
#else
#define HARDWARE_NAME "ESP32"
#endif
@@ -476,6 +479,30 @@
#define HAS_NIMBLE_2
#define HAS_IDF_3
#endif
#ifdef MARAUDER_MINI_V3
#define HAS_TOUCH
//#define HAS_FLIPPER_LED
//#define FLIPPER_ZERO_HAT
//#define HAS_BATTERY
#define HAS_BT
#define HAS_BUTTONS
//#define HAS_NEOPIXEL_LED
//#define HAS_PWR_MGMT
#define HAS_MINI_KB
#define HAS_SCREEN
#define HAS_MINI_SCREEN
#define HAS_GPS
#define HAS_C5_SD
#define HAS_SD
#define USE_SD
#define HAS_DUAL_BAND
#define HAS_PSRAM
//#define HAS_TEMP_SENSOR
#define HAS_NIMBLE_2
#define HAS_IDF_3
//#define HAS_SIMPLEX_DISPLAY
#endif
//// END BOARD FEATURES
//// POWER MANAGEMENT
@@ -740,6 +767,26 @@
#define D_PULL true
#endif
#ifdef MARAUDER_MINI_V3
#define L_BTN 0
#define C_BTN 1
#define U_BTN 4
#define R_BTN 8
#define D_BTN 9
#define HAS_L
#define HAS_R
#define HAS_U
#define HAS_D
#define HAS_C
#define L_PULL true
#define C_PULL true
#define U_PULL true
#define R_PULL true
#define D_PULL true
#endif
#endif
//// END BUTTON DEFINITIONS
@@ -1828,6 +1875,81 @@
#define STATUSBAR_COLOR 0x4A49
#endif
#ifdef MARAUDER_MINI_V3
#define CHAN_PER_PAGE 7
#define SCREEN_CHAR_WIDTH 40
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 27
#define TFT_DC 26
#define TFT_RST 5
#define TFT_BL 32
#define TOUCH_CS 21
#define SD_CS 4
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 9
#define BANNER_TEXT_SIZE 1
#ifndef TFT_WIDTH
#define TFT_WIDTH 128
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 128
#endif
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
#define EXT_BUTTON_WIDTH 0
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 6
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
#define HEIGHT_1 TFT_WIDTH
#define WIDTH_1 TFT_WIDTH
#define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
#define TEXT_HEIGHT (TFT_HEIGHT/10) // 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 TFT_HEIGHT // 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 10
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
#define STATUS_BAR_WIDTH (TFT_HEIGHT/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
#endif
#endif
//// END DISPLAY DEFINITIONS
@@ -2093,6 +2215,24 @@
#define ICON_H 22
#define BUTTON_PADDING 60
#endif
#ifdef MARAUDER_MINI_V3
#define BANNER_TIME 50
#define COMMAND_PREFIX "!"
// Keypad start position, key sizes and spacing
#define KEY_X (TFT_WIDTH/2) // Centre of key
#define KEY_Y (TFT_HEIGHT/4.5)
#define KEY_W TFT_WIDTH // Width and height
#define KEY_H (TFT_HEIGHT/12.8)
#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 10
#endif
//// END MENU DEFINITIONS
//// SD DEFINITIONS
@@ -2186,6 +2326,10 @@
#define SD_CS 10
#endif
#ifdef MARAUDER_MINI_V3
#define SD_CS 10
#endif
#endif
//// END SD DEFINITIONS
@@ -2287,6 +2431,8 @@
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_V8)
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_MINI_V3)
#define MEM_LOWER_LIM 10000
#endif
//// END MEMORY LOWER LIMIT STUFF
@@ -2408,6 +2554,10 @@
#define GPS_SERIAL_INDEX 1
#define GPS_TX 14
#define GPS_RX 13
#elif defined(MARAUDER_MINI_V3)
#define GPS_SERIAL_INDEX 1
#define GPS_TX 14
#define GPS_RX 13
#endif
#else
#define mac_history_len 100
@@ -2512,6 +2662,8 @@
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_V8)
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_MINI_V3)
#define MARAUDER_TITLE_BYTES 13578
#else
#define MARAUDER_TITLE_BYTES 13578
#endif
@@ -2611,6 +2763,12 @@
#define SD_MOSI TFT_MOSI
#define SD_SCK TFT_SCLK
#endif
#ifdef MARAUDER_MINI_V3
#define SD_MISO TFT_MISO
#define SD_MOSI TFT_MOSI
#define SD_SCK TFT_SCLK
#endif
#endif
//// END STUPID CYD STUFF

View File

@@ -125,11 +125,11 @@ uint32_t currentTime = 0;
void backlightOn() {
#ifdef HAS_SCREEN
#ifdef MARAUDER_MINI
#if defined(MARAUDER_MINI)
digitalWrite(TFT_BL, LOW);
#endif
#ifndef MARAUDER_MINI
#if !defined(MARAUDER_MINI)
digitalWrite(TFT_BL, HIGH);
#endif
#endif
@@ -137,11 +137,11 @@ void backlightOn() {
void backlightOff() {
#ifdef HAS_SCREEN
#ifdef MARAUDER_MINI
#if defined(MARAUDER_MINI)
digitalWrite(TFT_BL, HIGH);
#endif
#ifndef MARAUDER_MINI
#if !defined(MARAUDER_MINI)
digitalWrite(TFT_BL, LOW);
#endif
#endif