Adjust board definition

This commit is contained in:
Just Call Me Koko
2025-10-07 10:26:09 -04:00
parent 72951397d8
commit fc903cc66b
5 changed files with 208 additions and 42 deletions

View File

@@ -140,6 +140,8 @@ void Display::RunSetup()
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
#elif defined(MARAUDER_CYD_3_5_INCH)
uint16_t calData[5] = { 239, 3560, 262, 3643, 4 };
#elif defined(MARAUDER_V8)
uint16_t calData[5] = { 286, 3495, 437, 3449, 6 };
#elif defined(TFT_DIY)
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
#endif

View File

@@ -1860,6 +1860,8 @@ void MenuFunctions::orientDisplay()
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
#elif defined(MARAUDER_CYD_3_5_INCH)
uint16_t calData[5] = { 239, 3560, 262, 3643, 4 };
#elif defined(MARAUDER_V8)
uint16_t calData[5] = { 286, 3495, 437, 3449, 6 };
#else if defined(TFT_DIY)
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
#endif

View File

@@ -7924,24 +7924,46 @@ void WiFiScan::signalAnalyzerLoop(uint32_t tick) {
return;
}
else if (b == 4) {
if (set_channel > 1) {
set_channel--;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#ifndef HAS_DUAL_BAND
if (set_channel > 1) {
set_channel--;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#else
if (this->dual_band_channel_index > 1) {
this->dual_band_channel_index--;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#endif
}
// Channel + button pressed
else if (b == 5) {
if (set_channel < MAX_CHANNEL) {
set_channel++;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#ifndef HAS_DUAL_BAND
if (set_channel < MAX_CHANNEL) {
set_channel++;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#else
if (this->dual_band_channel_index < DUAL_BAND_CHANNELS - 1) {
this->dual_band_channel_index++;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel();
return;
}
#endif
}
#endif
#endif
@@ -7968,24 +7990,46 @@ void WiFiScan::channelAnalyzerLoop(uint32_t tick) {
return;
}
else if (b == 4) {
if (set_channel > 1) {
set_channel--;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(set_channel);
return;
}
#ifndef HAS_DUAL_BAND
if (set_channel > 1) {
set_channel--;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(set_channel);
return;
}
#else
if (this->dual_band_channel_index > 1) {
this->dual_band_channel_index--;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(this->set_channel);
return;
}
#endif
}
// Channel + button pressed
else if (b == 5) {
if (set_channel < MAX_CHANNEL) {
set_channel++;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(set_channel);
return;
}
#ifndef HAS_DUAL_BAND
if (set_channel < MAX_CHANNEL) {
set_channel++;
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(set_channel);
return;
}
#else
if (this->dual_band_channel_index < DUAL_BAND_CHANNELS - 1) {
this->dual_band_channel_index++;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
changeChannel(this->set_channel);
return;
}
#endif
}
#endif
#endif

View File

@@ -29,6 +29,7 @@
//#define MARAUDER_CYD_3_5_INCH
//#define MARAUDER_C5
//#define MARAUDER_CARDPUTER
//#define MARAUDER_V8
//// END BOARD TARGETS
#define MARAUDER_VERSION "v1.8.7"
@@ -80,6 +81,8 @@
#define HARDWARE_NAME "XIAO ESP32 S3"
#elif defined(MARAUDER_C5)
#define HARDWARE_NAME "ESP32-C5 DevKit"
#elif defined(MARAUDER_V8)
#define HARDWARE_NAME "Marauder v8"
#else
#define HARDWARE_NAME "ESP32"
#endif
@@ -417,6 +420,26 @@
//#define HAS_PSRAM
//#define HAS_TEMP_SENSOR
#endif
#ifdef MARAUDER_V8
#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_SCREEN
#define HAS_FULL_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
#endif
//// END BOARD FEATURES
//// POWER MANAGEMENT
@@ -1040,6 +1063,78 @@
#define STATUSBAR_COLOR 0x4A49
#define KIT_LED_BUILTIN 13
#endif
#if defined(MARAUDER_V8)
#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
//#ifndef MARAUDER_CYD_MICRO
//#define TFT_DIY
//#define TFT_SHIELD
//#endif
#define GRAPH_VERT_LIM TFT_HEIGHT/2
#define EXT_BUTTON_WIDTH 20
#define SCREEN_BUFFER
#define MAX_SCREEN_BUFFER 22
#define SCREEN_ORIENTATION 0
#define CHAR_WIDTH 12
#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 BUTTON_SCREEN_LIMIT
#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
@@ -1709,6 +1804,25 @@
//#define BUTTON_ARRAY_LEN 5
#endif
#if defined(MARAUDER_V8)
#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
#if defined(MARAUDER_CYD_MICRO)
#define BANNER_TIME 100
@@ -2002,6 +2116,10 @@
#define SD_CS 10
#endif
#ifdef MARAUDER_V8
#define SD_CS 10
#endif
#endif
//// END SD DEFINITIONS
@@ -2099,6 +2217,8 @@
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_C5)
#define MEM_LOWER_LIM 10000
#elif defined(MARAUDER_V8)
#define MEM_LOWER_LIM 10000
#endif
//// END MEMORY LOWER LIMIT STUFF
@@ -2212,6 +2332,10 @@
#define GPS_SERIAL_INDEX 1
#define GPS_TX 14
#define GPS_RX 13
#elif defined(MARAUDER_V8)
#define GPS_SERIAL_INDEX 1
#define GPS_TX 14
#define GPS_RX 13
#endif
#else
#define mac_history_len 100
@@ -2303,6 +2427,8 @@
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_C5)
#define MARAUDER_TITLE_BYTES 13578
#elif defined(MARAUDER_V8)
#define MARAUDER_TITLE_BYTES 13578
#else
#define MARAUDER_TITLE_BYTES 13578
#endif
@@ -2360,6 +2486,12 @@
#define SD_MOSI 7
#define SD_SCK 6
#endif
#ifdef MARAUDER_V8
#define SD_MISO TFT_MISO
#define SD_MOSI TFT_MOSI
#define SD_SCK TFT_SCLK
#endif
#endif
//// END STUPID CYD STUFF

View File

@@ -236,8 +236,6 @@ void setup()
backlightOn(); // Need this
#ifdef HAS_SCREEN
//delay(2000);
// Do some stealth mode stuff
#ifdef HAS_BUTTONS
if (c_btn.justPressed()) {
@@ -248,18 +246,6 @@ void setup()
Serial.println("Headless Mode enabled");
}
#endif
//display_obj.clearScreen();
//display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
//display_obj.tft.println(text_table0[0]);
//delay(2000);
//display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
//display_obj.tft.println(text_table0[1]);
#endif
settings_obj.begin();