diff --git a/Launcher/Launcher_2.0_C.bin b/Launcher/Launcher_2.0_C.bin
index 7258b8f..25a80f0 100644
Binary files a/Launcher/Launcher_2.0_C.bin and b/Launcher/Launcher_2.0_C.bin differ
diff --git a/Launcher/Launcher_2.0_CYD-2-USB.bin b/Launcher/Launcher_2.0_CYD-2-USB.bin
index 0caf367..e239b3f 100644
Binary files a/Launcher/Launcher_2.0_CYD-2-USB.bin and b/Launcher/Launcher_2.0_CYD-2-USB.bin differ
diff --git a/Launcher/Launcher_2.0_CYD-2432S028.bin b/Launcher/Launcher_2.0_CYD-2432S028.bin
index 4109090..b68cde0 100644
Binary files a/Launcher/Launcher_2.0_CYD-2432S028.bin and b/Launcher/Launcher_2.0_CYD-2432S028.bin differ
diff --git a/Launcher/Launcher_2.0_Cardputer.bin b/Launcher/Launcher_2.0_Cardputer.bin
index 7393fb9..2e7f720 100644
Binary files a/Launcher/Launcher_2.0_Cardputer.bin and b/Launcher/Launcher_2.0_Cardputer.bin differ
diff --git a/Launcher/Launcher_2.0_CoreS3.bin b/Launcher/Launcher_2.0_CoreS3.bin
index 6d90479..9cc9052 100644
Binary files a/Launcher/Launcher_2.0_CoreS3.bin and b/Launcher/Launcher_2.0_CoreS3.bin differ
diff --git a/Launcher/Launcher_2.0_Marauder-Mini.bin b/Launcher/Launcher_2.0_Marauder-Mini.bin
new file mode 100644
index 0000000..07d76d8
Binary files /dev/null and b/Launcher/Launcher_2.0_Marauder-Mini.bin differ
diff --git a/Launcher/Launcher_2.0_Marauder-v4-OG.bin b/Launcher/Launcher_2.0_Marauder-v4-OG.bin
new file mode 100644
index 0000000..e76092a
Binary files /dev/null and b/Launcher/Launcher_2.0_Marauder-v4-OG.bin differ
diff --git a/Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin b/Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin
index d6bd991..632539d 100644
Binary files a/Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin and b/Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin differ
diff --git a/Launcher/Launcher_2.0_core2.bin b/Launcher/Launcher_2.0_core2.bin
index b8487fc..6710167 100644
Binary files a/Launcher/Launcher_2.0_core2.bin and b/Launcher/Launcher_2.0_core2.bin differ
diff --git a/Launcher/Launcher_2.0_core_16Mb.bin b/Launcher/Launcher_2.0_core_16Mb.bin
index 9d44cf4..deafa4c 100644
Binary files a/Launcher/Launcher_2.0_core_16Mb.bin and b/Launcher/Launcher_2.0_core_16Mb.bin differ
diff --git a/Launcher/Launcher_2.0_cplus1_1.bin b/Launcher/Launcher_2.0_cplus1_1.bin
index 704f1a0..7448692 100644
Binary files a/Launcher/Launcher_2.0_cplus1_1.bin and b/Launcher/Launcher_2.0_cplus1_1.bin differ
diff --git a/Launcher/Launcher_2.0_cplus2.bin b/Launcher/Launcher_2.0_cplus2.bin
index 5cbecb3..f7ea72d 100644
Binary files a/Launcher/Launcher_2.0_cplus2.bin and b/Launcher/Launcher_2.0_cplus2.bin differ
diff --git a/Launcher/manifest_Marauder-Mini.json b/Launcher/manifest_Marauder-Mini.json
new file mode 100644
index 0000000..d89e529
--- /dev/null
+++ b/Launcher/manifest_Marauder-Mini.json
@@ -0,0 +1,12 @@
+{
+ "name": "Marauder-Mini",
+ "builds": [
+ {
+ "chipFamily": "ESP32",
+ "improv": false,
+ "parts": [
+ { "path": "Launcher_2.0_Marauder-Mini.bin", "offset": 0 }
+ ]
+ }
+ ]
+}
diff --git a/Launcher/manifest_Marauder-v4-OG.json b/Launcher/manifest_Marauder-v4-OG.json
new file mode 100644
index 0000000..0075301
--- /dev/null
+++ b/Launcher/manifest_Marauder-v4-OG.json
@@ -0,0 +1,12 @@
+{
+ "name": "Marauder-v4-OG",
+ "builds": [
+ {
+ "chipFamily": "ESP32",
+ "improv": false,
+ "parts": [
+ { "path": "Launcher_2.0_Marauder-v4-OG.bin", "offset": 0 }
+ ]
+ }
+ ]
+}
diff --git a/flash0.html b/flash0.html
index afb0f38..25bdf15 100644
--- a/flash0.html
+++ b/flash0.html
@@ -147,6 +147,12 @@
-= M5 Launcher =-
+
+
+
+
+
+
diff --git a/merge_files.bat b/merge_files.bat
index 00ba19c..febe25e 100644
--- a/merge_files.bat
+++ b/merge_files.bat
@@ -8,3 +8,5 @@ esptool --chip esp32s3 merge_bin --output Launcher/Launcher_2.0_CoreS3.bin
esptool --chip esp32s3 merge_bin --output Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin 0x0 .pio/build/lilygo-t-display-S3/bootloader.bin 0x8000 .pio/build/lilygo-t-display-S3/partitions.bin 0x10000 .pio/build/lilygo-t-display-S3/firmware.bin
esptool --chip esp32 merge_bin --output Launcher/Launcher_2.0_CYD-2432S028.bin 0x1000 .pio/build/CYD-2432S028/bootloader.bin 0x8000 .pio/build/CYD-2432S028/partitions.bin 0x10000 .pio/build/CYD-2432S028/firmware.bin
esptool --chip esp32 merge_bin --output Launcher/Launcher_2.0_CYD-2-USB.bin 0x1000 .pio/build/CYD-2-USB/bootloader.bin 0x8000 .pio/build/CYD-2-USB/partitions.bin 0x10000 .pio/build/CYD-2-USB/firmware.bin
+esptool --chip esp32 merge_bin --output Launcher/Launcher_2.0_Marauder-v4-OG.bin 0x1000 .pio/build/Marauder-v4-OG/bootloader.bin 0x8000 .pio/build/Marauder-v4-OG/partitions.bin 0x10000 .pio/build/Marauder-v4-OG/firmware.bin
+esptool --chip esp32 merge_bin --output Launcher/Launcher_2.0_Marauder-Mini.bin 0x1000 .pio/build/Marauder-Mini/bootloader.bin 0x8000 .pio/build/Marauder-Mini/partitions.bin 0x10000 .pio/build/Marauder-Mini/firmware.bin
diff --git a/merge_files.sh b/merge_files.sh
index 0505b42..71336c4 100755
--- a/merge_files.sh
+++ b/merge_files.sh
@@ -8,4 +8,6 @@ esptool.py --chip esp32s3 merge_bin --output Launcher/Launcher_2.0_CoreS3.bin
esptool.py --chip esp32s3 merge_bin --output Launcher/Launcher_2.0_T-Display-S3-Touchscreen.bin 0x0 .pio/build/lilygo-t-display-S3/bootloader.bin 0x8000 .pio/build/lilygo-t-display-S3/partitions.bin 0x10000 .pio/build/lilygo-t-display-S3/firmware.bin
esptool.py --chip esp32 merge_bin --output Launcher/Launcher_2.0_CYD-2432S028.bin 0x1000 .pio/build/CYD-2432S028/bootloader.bin 0x8000 .pio/build/CYD-2432S028/partitions.bin 0x10000 .pio/build/CYD-2432S028/firmware.bin
esptool.py --chip esp32 merge_bin --output Launcher/Launcher_2.0_CYD-2-USB.bin 0x1000 .pio/build/CYD-2-USB/bootloader.bin 0x8000 .pio/build/CYD-2-USB/partitions.bin 0x10000 .pio/build/CYD-2-USB/firmware.bin
+esptool.py --chip esp32 merge_bin --output Launcher/Launcher_2.0_Marauder-v4-OG.bin 0x1000 .pio/build/Marauder-v4-OG/bootloader.bin 0x8000 .pio/build/Marauder-v4-OG/partitions.bin 0x10000 .pio/build/Marauder-v4-OG/firmware.bin
+esptool.py --chip esp32 merge_bin --output Launcher/Launcher_2.0_Marauder-Mini.bin 0x1000 .pio/build/Marauder-Mini/bootloader.bin 0x8000 .pio/build/Marauder-Mini/partitions.bin 0x10000 .pio/build/Marauder-Mini/firmware.bin
diff --git a/platformio.ini b/platformio.ini
index 75cfe43..e560e0d 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -20,6 +20,8 @@ default_envs =
lilygo-t-display-S3
CYD-2432S028
CYD-2-USB
+ Marauder-v4-OG
+ Marauder-Mini
[common]
build_flags =
@@ -34,7 +36,6 @@ lib_deps =
AsyncTCP
esphome/ESPAsyncWebServer-esphome
bblanchon/ArduinoJson @ ^7.0.4
- ;bodmer/TFT_eSPI@^2.5.43
[env:m5stack-cplus2]
@@ -55,6 +56,11 @@ build_flags =
-mfix-esp32-psram-cache-strategy=memw
-DSTICK_C_PLUS2=1
+
+ ;-DPART_04MB=1
+ -DPART_08MB=1
+ ;-DPART_16MB=1
+
-DROTATION=3
-DHAS_BTN=1
-DSEL_BTN=37
@@ -62,7 +68,6 @@ build_flags =
-DDW_BTN=39
-DBTN_ACT=LOW
-DBTN_ALIAS='"M5"'
- -DHAS_SCREEN=1
-DWIDTH=240
-DHEIGHT=135
-DLED=19
@@ -101,8 +106,6 @@ build_flags =
-DSDCARD_MOSI=26
lib_deps =
- ;AsyncTCP
- ;esphome/ESPAsyncWebServer-esphome
${common.lib_deps}
[env:m5stack-cplus1_1]
@@ -115,6 +118,11 @@ board_build.partitions = custom_4Mb.csv
build_flags =
${common.build_flags}
-DSTICK_C_PLUS=1
+
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
-DROTATION=3
-DHAS_BTN=1
-DSEL_BTN=37
@@ -171,11 +179,15 @@ build_flags =
${common.build_flags}
-DCORE_DEBUG_LEVEL=5
-DCARDPUTER=1
+
+ ;-DPART_04MB =0
+ -DPART_08MB=1
+ ;-DPART_16MB=0
+
-DROTATION=1
-DHAS_BTN=1
-DBTN_ALIAS='"Ok"'
-DBTN_PIN=0
- -DHAS_SCREEN=1
-DWIDTH=240
-DHEIGHT=135
@@ -216,8 +228,6 @@ build_flags =
-DSDCARD_MOSI=14
lib_deps =
- ;AsyncTCP
- ;esphome/ESPAsyncWebServer-esphome
${common.lib_deps}
@@ -231,6 +241,11 @@ build_flags =
${common.build_flags}
-DSTICK_C=1
-DSTICK_C_PLUS=1
+
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
-DROTATION=3
-DHAS_BTN=1
-DSEL_BTN=37
@@ -280,13 +295,17 @@ build_flags =
-mfix-esp32-psram-cache-strategy=memw
-DCORE2=1
+
+ ;-DPART_04MB =0
+ ;-DPART_08MB =0
+ -DPART_16MB=1
+
-DROTATION=1
-DHAS_BTN=0
-DSEL_BTN=0
-DUP_BTN=0
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DLED=1
@@ -303,7 +322,6 @@ build_flags =
-DTFT_INVERSION_ON=1
-DM5STACK=1
- ;-DTFT_MISO=38
-DTFT_MOSI=23
-DTFT_SCLK=18
-DTFT_CS=5
@@ -312,8 +330,6 @@ build_flags =
-DTFT_BL=-1
-DTOUCH_CS=-1
-
-
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=20000000
-DSPI_READ_FREQUENCY=20000000
@@ -347,13 +363,17 @@ build_flags =
-mfix-esp32-psram-cache-strategy=memw
-DCORE=1
+
+ ;-DPART_04MB =0
+ ;-DPART_08MB =0
+ -DPART_16MB=1
+
-DROTATION=1
-DHAS_BTN=0
-DSEL_BTN=0
-DUP_BTN=0
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DLED=1
@@ -371,7 +391,6 @@ build_flags =
-DTFT_BACKLIGHT_ON=1
-DM5STACK=1
- ;-DTFT_MISO=38
-DTFT_MOSI=23
-DTFT_SCLK=18
-DTFT_CS=14
@@ -380,8 +399,6 @@ build_flags =
-DTFT_BL=32
-DTOUCH_CS=-1
-
-
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=20000000
-DSPI_READ_FREQUENCY=20000000
@@ -411,13 +428,17 @@ build_flags =
-DBOARD_HAS_PSRAM
-DCORE3=1
+
+ ;-DPART_04MB =0
+ ;-DPART_08MB =0
+ -DPART_16MB=1
+
-DROTATION=1
-DHAS_BTN=0
-DSEL_BTN=0
-DUP_BTN=0
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DLED=1
@@ -443,8 +464,6 @@ build_flags =
-DTFT_BL=-1
-DTOUCH_CS=-1
-
-
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=20000000
-DSPI_READ_FREQUENCY=20000000
@@ -465,7 +484,6 @@ platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0
board = lilygo-t-display-s3
framework = arduino
monitor_speed = 115200
-;extra_scripts = pre:support_files/nvs_script.py
board_build.partitions = custom_16Mb.csv
build_flags =
${common.build_flags}
@@ -473,15 +491,18 @@ build_flags =
-DBOARD_HAS_PSRAM=1
-DT_DISPLAY_S3=1
+
+ ;-DPART_04MB =0
+ ;-DPART_08MB =0
+ -DPART_16MB=1
-DROTATION=3
- -DHAS_BTN=0
+ -DHAS_BTN=1
-DSEL_BTN=0
-DUP_BTN=-1
-DDW_BTN=14
-DBTN_ACT=LOW
-DBAT_PIN=4
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DMINBRIGHT=190
-DBACKLIGHT=38
-DWIDTH=320
@@ -525,6 +546,10 @@ build_flags =
-DCYD=1
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
-DROTATION=3
-DHAS_BTN=0
-DSEL_BTN=-1
@@ -533,7 +558,6 @@ build_flags =
-DBTN_ACT=LOW
-DBAT_PIN=4
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DMINBRIGHT=190
-DBACKLIGHT=21
-DWIDTH=320
@@ -582,7 +606,6 @@ build_flags =
lib_deps =
${common.lib_deps}
- https://github.com/PaulStoffregen/XPT2046_Touchscreen
[env:CYD-2-USB]
@@ -598,6 +621,10 @@ build_flags =
-DCYD=1
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
-DROTATION=3
-DHAS_BTN=0
-DSEL_BTN=-1
@@ -606,7 +633,6 @@ build_flags =
-DBTN_ACT=LOW
-DBAT_PIN=4
-DBTN_ALIAS='"Sel"'
- -DHAS_SCREEN=1
-DMINBRIGHT=190
-DBACKLIGHT=21
-DWIDTH=320
@@ -655,4 +681,146 @@ build_flags =
-DTFT_BRIGHT_FREQ=10000
lib_deps =
${common.lib_deps}
- https://github.com/PaulStoffregen/XPT2046_Touchscreen
\ No newline at end of file
+
+[env:Marauder-v4-OG]
+platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0.0.2/platform-espressif32.zip
+board = esp32dev
+monitor_speed = 115200
+monitor_filters = esp32_exception_decoder
+framework = arduino
+board_build.partitions = custom_4Mb.csv
+build_flags =
+ ${common.build_flags}
+ -DCORE_DEBUG_LEVEL=5
+
+ -DMARAUDERV4=1
+
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
+ -DROTATION=3
+ -DHAS_BTN=0
+ -DSEL_BTN=-1
+ -DUP_BTN=-1
+ -DDW_BTN=-1
+ -DBTN_ACT=LOW
+ -DBAT_PIN=4
+ -DBTN_ALIAS='"Sel"'
+ -DMINBRIGHT=190
+ -DBACKLIGHT=21
+ -DWIDTH=320
+ -DHEIGHT=220 ;170 - 20 para a margem inferior
+ -DLED=4
+ -DLED_ON=LOW
+
+ -DFONT_P=1
+ -DFONT_M=2
+ -DFONT_G=3
+ -DMAX_MENU_SIZE=5
+ -DMAX_ITEMS=7
+
+ -DUSER_SETUP_LOADED=1
+ -DILI9341_DRIVER=1
+ -DTFT_MISO=19
+ -DTFT_MOSI=23
+ -DTFT_SCLK=18
+ -DTFT_CS=17
+ -DTFT_DC=16
+ -DTFT_RST=5
+ -DTFT_BL=32
+ -DTFT_BACKLIGHT_ON=HIGH
+ -DSMOOTH_FONT=1
+ -DSPI_FREQUENCY=40000000
+ -DSPI_READ_FREQUENCY=16000000
+ -DSPI_TOUCH_FREQUENCY=2500000
+ -DTOUCH_CS=21
+
+ -DSDCARD_SPI_BUS=VSPI
+ -DSDCARD_CS=12
+ -DSDCARD_SCK=18
+ -DSDCARD_MISO=19
+ -DSDCARD_MOSI=23
+
+ -DXPT2046_MOSI=23
+ -DXPT2046_MISO=19
+ -DXPT2046_CLK=18
+ -DXPT2046_CS=21
+
+ -DTFT_BRIGHT_CHANNEL=0
+ -DTFT_BRIGHT_Bits=8
+ -DTFT_BRIGHT_FREQ=10000
+
+lib_deps =
+ ${common.lib_deps}
+
+[env:Marauder-Mini]
+platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0.0.2/platform-espressif32.zip
+board = esp32dev
+monitor_speed = 115200
+monitor_filters = esp32_exception_decoder
+framework = arduino
+board_build.partitions = custom_4Mb.csv
+build_flags =
+ ${common.build_flags}
+ -DCORE_DEBUG_LEVEL=5
+
+ -DMARAUDERMINI=1
+
+ -DPART_04MB=1
+ ;-DPART_08MB =0
+ ;-DPART_16MB=0
+
+ -DROTATION=0
+ -DHAS_BTN=1
+ -DSEL_BTN=34
+ -DUP_BTN=36
+ -DDW_BTN=35
+ -DBTN_ACT=LOW
+ -DBAT_PIN=4
+ -DBTN_ALIAS='"Sel"'
+ -DMINBRIGHT=190
+ -DBACKLIGHT=32
+ -DWIDTH=128
+ -DHEIGHT=128
+ -DLED=-1
+ -DLED_ON=LOW
+
+ -DFONT_P=1
+ -DFONT_M=1
+ -DFONT_G=2
+ -DMAX_MENU_SIZE=4
+ -DMAX_ITEMS=6
+
+ -DUSER_SETUP_LOADED=1
+ -DST7735_DRIVER=1
+ -DST7735_GREENTAB3
+ -DTFT_RGB_ORDER=TFT_BGR
+ -DTFT_WIDTH=128
+ -DTFT_HEIGHT=128
+ -DTFT_MISO=19
+ -DTFT_MOSI=23
+ -DTFT_SCLK=18
+ -DTFT_BL=32
+ -DTFT_CS=17
+ -DTFT_DC=16
+ -DTFT_RST=5
+ -DTFT_BACKLIGHT_ON=LOW
+ -DSMOOTH_FONT=1
+ -DSPI_FREQUENCY=40000000
+ -DSPI_READ_FREQUENCY=20000000
+ -DSPI_TOUCH_FREQUENCY=2500000
+ -DTOUCH_CS=-1
+
+ -DSDCARD_SPI_BUS=VSPI
+ -DSDCARD_CS=4
+ -DSDCARD_SCK=18
+ -DSDCARD_MISO=19
+ -DSDCARD_MOSI=23
+
+ -DTFT_BRIGHT_CHANNEL=0
+ -DTFT_BRIGHT_Bits=8
+ -DTFT_BRIGHT_FREQ=10000
+
+lib_deps =
+ ${common.lib_deps}
diff --git a/src/display.cpp b/src/display.cpp
index c1e42e4..0084c76 100644
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -189,7 +189,7 @@ void displayCurrentItem(JsonDocument doc, int currentIndex) {
#if defined(M5STACK)
coreFooter();
#endif
- #if defined(T_DISPLAY_S3) || defined(CYD)
+ #if defined(T_DISPLAY_S3) || defined(CYD) || defined(MARAUDERV4)
TdisplayS3Footer();
#endif
int bar = int(WIDTH/(doc.size()));
@@ -247,7 +247,7 @@ void displayCurrentVersion(String name, String author, String version, String pu
#if defined(M5STACK)
coreFooter(ALCOLOR);
#endif
- #if defined(T_DISPLAY_S3) || defined(CYD)
+ #if defined(T_DISPLAY_S3) || defined(CYD) || defined(MARAUDERV4)
TdisplayS3Footer(ALCOLOR);
#endif
@@ -415,26 +415,26 @@ void drawMainMenu(int index) {
};
const char* texts[4] = { "SD", "OTA", "WUI","CFG" };
-#ifndef STICK_C
- const char* messages[4] = { "Launch from or mng SDCard",
- "Install/download from M5Burner",
- "Start Web User Interface",
- "Change Launcher settings." };
-#else
+#if defined(STICK_C) || defined(MARAUDERMINI)
const char* messages[4] = { "Launch from SDCard",
"Online Installer",
"Start WebUI",
"Launcher settings." };
-
+#else
+ const char* messages[4] = { "Launch from or mng SDCard",
+ "Install/download from M5Burner",
+ "Start Web User Interface",
+ "Change Launcher settings." };
#endif
tft.fillSmoothRoundRect(6,26,WIDTH-12,HEIGHT-12,5,BGCOLOR);
setTftDisplay(12, 12, FGCOLOR, 1, BGCOLOR);
-#ifndef STICK_C
- tft.print("M5Launcher " + String(LAUNCHER));
- tft.setTextSize(FONT_G);
-#else
+
+#if defined(STICK_C) || defined(MARAUDERMINI)
tft.print("Launcher " + String(LAUNCHER));
tft.setTextSize(FONT_M);
+#else
+ tft.print("M5Launcher " + String(LAUNCHER));
+ tft.setTextSize(FONT_G);
#endif
for (int i = 0; i < 3; ++i) {
int x = border / 2 + i * ((WIDTH-20) / 3) + 10;
@@ -523,7 +523,7 @@ void listFiles(int index, String fileList[][3]) {
#if defined(M5STACK)
coreFooter();
#endif
- #if defined(T_DISPLAY_S3) || defined(CYD)
+ #if defined(T_DISPLAY_S3) || defined(CYD) || defined(MARAUDERV4)
TdisplayS3Footer();
#endif
}
diff --git a/src/main.cpp b/src/main.cpp
index 05cc4bb..56d9f3b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -50,10 +50,6 @@ std::vector>> options;
const int bufSize = 1024;
uint8_t buff[1024] = {0};
-#if defined(CYD)
-//SPIClass touchSPI;
-#endif
-
#include "display.h"
#include "mykeyboard.h"
#include "onlineLauncher.h"
@@ -154,7 +150,16 @@ void setup() {
log_i("Touch IC not Started");
} else log_i("Touch IC Started");
digitalWrite(XPT2046_CS, LOW);
-
+ #elif defined(HAS_BTN)
+ #if UP_BTN >= 0
+ pinMode(UP_BTN, INPUT);
+ #endif
+ #if SEL_BTN >= 0
+ pinMode(SEL_BTN, INPUT);
+ #endif
+ #if DW_BTN >= 0
+ pinMode(DW_BTN, INPUT);
+ #endif
#endif
#if defined(BACKLIGHT)
@@ -192,10 +197,17 @@ void setup() {
EEPROM.write(EEPROMSIZE-12, 0xe5);
EEPROM.commit(); // Store data to EEPROM
}
+ #if ROTATION == 0 // Marauder mini
+ if(EEPROM.read(EEPROMSIZE-13) != 0 && EEPROM.read(EEPROMSIZE-13) != 2) {
+ EEPROM.write(EEPROMSIZE-13, ROTATION); // Left rotation
+ EEPROM.commit(); // Store data to EEPROM
+ }
+ #else
if(EEPROM.read(EEPROMSIZE-13) != 1 && EEPROM.read(EEPROMSIZE-13) != 3) {
EEPROM.write(EEPROMSIZE-13, ROTATION); // Left rotation
EEPROM.commit(); // Store data to EEPROM
}
+ #endif
rotation = EEPROM.read(EEPROMSIZE-13);
dimmerSet = EEPROM.read(EEPROMSIZE-14);
bright = EEPROM.read(EEPROMSIZE-15);
@@ -222,6 +234,16 @@ void setup() {
setBrightness(bright,false);
initDisplay(true);
+
+ #if defined(MARAUDERV4)
+
+ //uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; //org portrait
+uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield from maruader
+//uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY from maruader
+
+ tft.setTouch(calData);
+ #endif
+
#if defined(T_DISPLAY_S3) || defined(CYD)
touch.setRotation(1);
// PWM backlight setup
@@ -246,7 +268,7 @@ void setup() {
#if defined(M5STACK)
coreFooter2();
#endif
- #if defined(T_DISPLAY_S3) || defined(CYD)
+ #if defined(T_DISPLAY_S3) || defined(CYD) || defined(MARAUDERV4)
TdisplayS3Footer2();
#endif
//Start Bootscreen timer
@@ -254,18 +276,7 @@ void setup() {
while(millis()(HEIGHT) && t.x>terco*bot && t.x
#define LCD_MODULE_CMD_1
extern TouchLib touch;
-#endif
-
-#if defined(CYD)
- //#include
- //extern XPT2046_Touchscreen touch;
+#elif defined(CYD)
#include "CYD28_TouchscreenR.h"
#define CYD28_DISPLAY_HOR_RES_MAX 320
#define CYD28_DISPLAY_VER_RES_MAX 240
diff --git a/src/onlineLauncher.cpp b/src/onlineLauncher.cpp
index b52f9e9..9710251 100644
--- a/src/onlineLauncher.cpp
+++ b/src/onlineLauncher.cpp
@@ -152,7 +152,7 @@ bool GetJsonFromM5() {
const char* serverUrl = "https://raw.githubusercontent.com/bmorcelli/M5Stack-json-fw/main/v2/core.json";
#elif defined(CORE3)
const char* serverUrl = "https://raw.githubusercontent.com/bmorcelli/M5Stack-json-fw/main/v2/cores3.json";
- #elif defined(T_DISPLAY_S3) || defined(CYD)
+ #else
const char* serverUrl = "https://raw.githubusercontent.com/bmorcelli/M5Stack-json-fw/main/v2/third_party.json";
#endif
diff --git a/src/partitioner.cpp b/src/partitioner.cpp
index 06f1943..9967b96 100644
--- a/src/partitioner.cpp
+++ b/src/partitioner.cpp
@@ -9,7 +9,7 @@
#define PARTITION_SIZE 4096
// Using "buff[4096]" to store and write the partitions
-#if defined(CARDPUTER) || defined(STICK_C_PLUS2)
+#if defined(PART_08MB)
const uint8_t def_part[224] PROGMEM = { // default partition scheme(App, FAT and SPIFFS)
0xAA, 0x50, 0x01, 0x02, 0x00, 0x90, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x6E, 0x76, 0x73, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -55,7 +55,7 @@ const uint8_t uiflow2[192] PROGMEM = { // uiflow partition scheme, APP, sys(FAT)
0x48, 0xF8, 0x55, 0x10, 0x56, 0x7F, 0x21, 0xB9, 0x2C, 0x39, 0x4A, 0xA9, 0xF7, 0xC9, 0x22, 0x3B,
};
-#elif defined(STICK_C_PLUS) || defined(CYD)
+#elif defined(PART_04MB)
const uint8_t def_part[192] = { // 4Mb app partition
0xAA, 0x50, 0x01, 0x02, 0x00, 0x90, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x6E, 0x76, 0x73, 0x00,
@@ -86,7 +86,7 @@ const uint8_t orca[192] = { // 4Mb app partition
0xEB, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xE5, 0x00, 0x17, 0x0A, 0x68, 0x12, 0x14, 0xEA, 0xFE, 0x89, 0x1E, 0x0F, 0x92, 0x04, 0x16, 0x1A,
};
-#elif defined(CORE) || defined(CORE2) || defined(CORE3) || defined(T_DISPLAY_S3)
+#elif defined(PART_16MB)
const uint8_t def_part[288] PROGMEM = {
0xAA, 0x50, 0x01, 0x02, 0x00, 0x90, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x6E, 0x76, 0x73, 0x00,
@@ -178,12 +178,12 @@ void partitioner() {
// Opções de partição
options = {
{"Default", [&](){ partition = 0; }},
- #if defined(CARDPUTER) || defined(STICK_C_PLUS2)
+ #if defined(PART_08MB)
{"Doom", [&](){ partition = 1; }},
{"UiFlow2", [&](){ partition = 2; }},
- #elif defined(STICK_C_PLUS)
+ #elif defined(PART_04MB)
{"Orca", [&](){ partition = 1; }},
- #elif defined(CORE) || defined(CORE2) || defined(CORE3)
+ #elif defined(PART_16MB)
{"UiFlow1", [&](){ partition = 1; }},
#endif
};
@@ -195,18 +195,18 @@ void partitioner() {
case 0: data = def_part;
data_size = sizeof(def_part);
break;
- #if defined(CARDPUTER) || defined(STICK_C_PLUS2)
+ #if defined(PART_08MB)
case 1: data = doom;
data_size = sizeof(doom);
break;
case 2: data = uiflow2;
data_size = sizeof(uiflow2);
break;
- #elif defined(STICK_C_PLUS)
+ #elif defined(PART_04MB)
case 1: data = orca;
data_size = sizeof(orca);
break;
- #elif defined(CORE) || defined(CORE2) || defined(CORE3)
+ #elif defined(PART_16MB)
case 1: data = uiFlow1;
displayRedStripe("Experimental");
delay(2000);
diff --git a/src/sd_functions.cpp b/src/sd_functions.cpp
index 19747e6..eef335d 100644
--- a/src/sd_functions.cpp
+++ b/src/sd_functions.cpp
@@ -56,7 +56,7 @@ bool eraseFAT() {
bool setupSdCard() {
#if defined(T_DISPLAY_S3) // Core2 uses the same SPI bus as TFT
if (!SD_MMC.begin("/sdcard",true))
- #elif defined(M5STACK)
+ #elif (TFT_MOSI == SDCARD_MOSI)
if (!SDM.begin(SDCARD_CS))
#else
sdcardSPI.begin(SDCARD_SCK, SDCARD_MISO, SDCARD_MOSI, SDCARD_CS); // start SPI communications
@@ -82,10 +82,6 @@ bool setupSdCard() {
***************************************************************************************/
void closeSdCard() {
SDM.end();
- #if !defined(M5STACK)
- //sdcardSPI.end(); // Closes SPI connections and release pins.
- #endif
- //Serial.println("SD Card Unmounted...");
sdcardMounted = false;
}
diff --git a/src/settings.cpp b/src/settings.cpp
index ac3e0a9..02f2502 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -46,7 +46,7 @@ void setBrightness(int brightval, bool save) {
axp192.ScreenBreath(brightval);
#elif defined(M5STACK)
M5.Display.setBrightness(brightval);
- #elif defined(T_DISPLAY_S3) || defined(CYD)
+ #else
int dutyCycle;
if (brightval==100) dutyCycle=255;
else if (brightval==75) dutyCycle=130;
@@ -86,7 +86,7 @@ void getBrightness() {
axp192.ScreenBreath(bright);
#elif defined(M5STACK)
M5.Display.setBrightness(bright);
- #elif defined(T_DISPLAY_S3) || defined(CYD)
+#else
int dutyCycle;
if (bright==100) dutyCycle=255;
else if (bright==75) dutyCycle=130;
@@ -107,7 +107,7 @@ void getBrightness() {
axp192.ScreenBreath(bright);
#elif defined(M5STACK)
M5.Display.setBrightness(bright);
- #elif defined(T_DISPLAY_S3) || defined(CYD)
+#else
int dutyCycle;
if (bright==100) dutyCycle=255;
else if (bright==75) dutyCycle=130;
@@ -177,14 +177,19 @@ bool gsetAskSpiffs(bool set, bool value) {
** Function: gsetRotation
** get onlyBins from EEPROM
**********************************************************************/
+#if ROTATION==0
+#define DRV 0
+#else
+#define DRV 1
+#endif
int gsetRotation(bool set){
EEPROM.begin(EEPROMSIZE);
int getRot = EEPROM.read(EEPROMSIZE-13);
int result = ROTATION;
- if(getRot==1 && set) result = 3;
- else if(getRot==3 && set) result = 1;
- else if(getRot<=3) result = getRot;
+ if(getRot==(DRV) && set) result = (DRV+2);
+ else if(getRot==(DRV+2) && set) result = DRV;
+ else if(getRot<=(DRV+2)) result = getRot;
else {
set=true;
result = ROTATION;