Skip to content

Commit

Permalink
Merge pull request #500 from justcallmekoko/develop
Browse files Browse the repository at this point in the history
UI and Bootloop fixes, Adafruit Reverse Feather
  • Loading branch information
justcallmekoko authored Feb 27, 2024
2 parents e80fab8 + d183894 commit ba92978
Show file tree
Hide file tree
Showing 18 changed files with 826 additions and 212 deletions.
84 changes: 69 additions & 15 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,12 @@ jobs:
repository: bigbrodude6119/ESPAsyncWebServer
ref: master
path: CustomESPAsyncWebServer

#- name: Install TFT_eSPI
# uses: actions/checkout@v2
# with:
# repository: justcallmekoko/TFT_eSPI
# ref: master
# path: CustomTFT_eSPI

- name: Install TFT_eSPI
uses: actions/checkout@v2
with:
repository: Bodmer/TFT_eSPI
ref: 2.2.23
ref: V2.5.34
path: CustomTFT_eSPI

- name: Install lv_arduino
Expand Down Expand Up @@ -106,12 +99,12 @@ jobs:
ref: v6.18.2
path: CustomArduinoJson

- name: Install SwitchLib
uses: actions/checkout@v2
with:
repository: justcallmekoko/SwitchLib
ref: main
path: CustomSwitchLib
#- name: Install SwitchLib
# uses: actions/checkout@v2
# with:
# repository: justcallmekoko/SwitchLib
# ref: main
# path: CustomSwitchLib

- name: Install LinkedList
uses: actions/checkout@v2
Expand All @@ -138,6 +131,7 @@ jobs:
cp User_Setup_marauder_mini.h CustomTFT_eSPI/
cp User_Setup_og_marauder.h CustomTFT_eSPI/
cp User_Setup_marauder_m5stickc.h CustomTFT_eSPI/
cp User_Setup_marauder_rev_feather.h CustomTFT_eSPI/
pwd
ls -la
ls -la CustomTFT_eSPI
Expand Down Expand Up @@ -182,6 +176,7 @@ jobs:
- name: Configure configs.h for Flipper Zero WiFi Dev Board
run: |
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STICKC/ \/\/#define MARAUDER_M5STICKC/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
Expand Down Expand Up @@ -218,9 +213,11 @@ jobs:
- name: Configure TFT_eSPI and configs.h for OG Marauder
run: |
pwd
find /home/runner/ -name "*TFT_eSPI*"
find /home/runner/ -name "*TFT_eSPI*"
sed -i 's/^#include <User_Setup_marauder_rev_feather.h>/\/\/#include <User_Setup_marauder_rev_feather.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_V4/ #define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -244,8 +241,10 @@ jobs:
- name: Configure TFT_eSPI and configs.h for Marauder v6
run: |
sed -i 's/^#include <User_Setup_marauder_rev_feather.h>/\/\/#include <User_Setup_marauder_rev_feather.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_V6/ #define MARAUDER_V6/' esp32_marauder/configs.h
Expand Down Expand Up @@ -286,6 +285,7 @@ jobs:
- name: Configure TFT_eSPI and configs.h for Marauder v6.1
run: |
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -311,6 +311,7 @@ jobs:
run: |
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -336,6 +337,7 @@ jobs:
run: |
sed -i 's/^\/\/#include <User_Setup_marauder_mini.h>/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^#include <User_Setup_og_marauder.h>/\/\/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_MINI/ #define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -359,6 +361,7 @@ jobs:
- name: Configure TFT_eSPI and configs.h for ESP32 LDDB
run: |
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -382,6 +385,7 @@ jobs:
- name: Configure TFT_eSPI and configs.h for Marauder Dev Board Pro
run: |
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand Down Expand Up @@ -409,6 +413,7 @@ jobs:
find /home/runner/ -name "*TFT_eSPI*"
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^\/\/#include <User_Setup_marauder_m5stickc.h>/#include <User_Setup_marauder_m5stickc.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_REV_FEATHER/ \/\/#define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
Expand All @@ -430,6 +435,36 @@ jobs:
- name: Rename Marauder M5StickC bin
run: |
mv ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus.bin
- name: Configure TFT_eSPI and configs.h for Marauder Rev Feather
run: |
pwd
find /home/runner/ -name "*TFT_eSPI*"
sed -i 's/^\/\/#include <User_Setup_marauder_rev_feather.h>/#include <User_Setup_marauder_rev_feather.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^#include <User_Setup_marauder_m5stickc.h>/\/\/#include <User_Setup_marauder_m5stickc.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ \/\/#define MARAUDER_REV_FEATHER/ #define MARAUDER_REV_FEATHER/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6_1/ \/\/#define MARAUDER_V6_1/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_KIT/ \/\/#define MARAUDER_KIT/' esp32_marauder/configs.h
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STICKC/ \/\/#define MARAUDER_M5STICKC/' esp32_marauder/configs.h
- name: Build Marauder for Marauder Rev Feather
uses: ArminJo/[email protected]
with:
sketch-names: esp32_marauder.ino
arduino-board-fqbn: esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled
extra-arduino-cli-args: "--warnings none"

- name: Rename Marauder Marauder Rev Feather
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.rev_feather.bin
- name: Display finished bins
run: |
Expand Down Expand Up @@ -505,6 +540,13 @@ jobs:
path: ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus.bin
retention-days: 5

- name: 'Upload Rev Feather Artifact'
uses: actions/upload-artifact@v3
with:
name: esp32_marauder.rev_feather.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.rev_feather.bin
retention-days: 5

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down Expand Up @@ -636,3 +678,15 @@ jobs:
asset_name: esp32_marauder.m5stickc_plus.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'

- name: Upload Rev Feather Asset
id: upload-rev-feather-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.rev_feather.bin
asset_name: esp32_marauder.rev_feather.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'
1 change: 1 addition & 0 deletions User_Setup_Select.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <User_Setup_og_marauder.h>
//#include <User_Setup_marauder_mini.h>
//#include <User_Setup_marauder_m5stickc.h>
//#include <User_Setup_marauder_rev_feather.h>

//#include <User_Setups/Setup1_ILI9341.h> // Setup file configured for my ILI9341
//#include <User_Setups/Setup2_ST7735.h> // Setup file configured for my ST7735
Expand Down
4 changes: 2 additions & 2 deletions User_Setup_marauder_mini.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
// For ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
// Try ONE option at a time to find the correct colour order for your display

#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red

// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below

Expand Down
59 changes: 59 additions & 0 deletions User_Setup_marauder_rev_feather.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// ST7789 135 x 240 display with no chip select line

#define ST7789_DRIVER // Configure all registers

#define TFT_WIDTH 135
#define TFT_HEIGHT 240

#define CGRAM_OFFSET // Library will add offsets required

//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red

//#define TFT_INVERSION_ON
//#define TFT_INVERSION_OFF

// DSTIKE stepup
//#define TFT_DC 23
//#define TFT_RST 32
//#define TFT_MOSI 26
//#define TFT_SCLK 27

// Generic ESP32 setup
//#define TFT_MISO 19
//#define TFT_MOSI 23
//#define TFT_SCLK 18
//#define TFT_CS -1 // Not connected
//#define TFT_DC 2
//#define TFT_RST 4 // Connect reset to ensure display initialises

// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
#define TFT_MISO 37
#define TFT_MOSI 35
#define TFT_SCLK 36
#define TFT_CS 42 // Define as not used
#define TFT_DC 40 // Data Command control pin
#define TFT_RST 41 // TFT reset pin (could connect to NodeMCU RST, see next line)
#define TFT_BL 45


#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

#define SMOOTH_FONT


// #define SPI_FREQUENCY 27000000
#define SPI_FREQUENCY 40000000

#define SPI_READ_FREQUENCY 20000000

#define SPI_TOUCH_FREQUENCY 2500000

// #define SUPPORT_TRANSACTIONS
8 changes: 8 additions & 0 deletions esp32_marauder/.theia/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
"version": "0.2.0",
"configurations": [

]
}
12 changes: 12 additions & 0 deletions esp32_marauder/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ void Display::RunSetup()
tft.setRotation(1);
#endif

#ifdef MARAUDER_REV_FEATHER
tft.setRotation(1);
#endif

tft.setCursor(0, 0);

#ifdef HAS_ILI9341
Expand All @@ -53,6 +57,14 @@ void Display::RunSetup()
#ifdef KIT
pinMode(KIT_LED_BUILTIN, OUTPUT);
#endif

#ifdef MARAUDER_REV_FEATHER
pinMode(7, OUTPUT);

delay(10);

digitalWrite(7, HIGH);
#endif
}

void Display::drawFrame()
Expand Down
12 changes: 10 additions & 2 deletions esp32_marauder/EvilPortal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ bool EvilPortal::setHtml() {
return true;
}
Serial.println("Setting HTML...");
File html_file = sd_obj.getFile("/" + this->target_html_name);
#ifdef HAS_SD
File html_file = sd_obj.getFile("/" + this->target_html_name);
#else
File html_file;
#endif
if (!html_file) {
#ifdef HAS_SCREEN
this->sendToDisplay("Could not find /" + this->target_html_name);
Expand Down Expand Up @@ -139,7 +143,11 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
// If there are no SSIDs and there are no APs selected, pull from file
// This means the file is last resort
if ((ssids->size() <= 0) && (temp_ap_name == "")) {
File ap_config_file = sd_obj.getFile("/ap.config.txt");
#ifdef HAS_SD
File ap_config_file = sd_obj.getFile("/ap.config.txt");
#else
File ap_config_file;
#endif
// Could not open config file. return false
if (!ap_config_file) {
#ifdef HAS_SCREEN
Expand Down
10 changes: 4 additions & 6 deletions esp32_marauder/GpsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ void GpsInterface::begin() {

delay(3900);

MicroNMEA::sendSentence(Serial2, "$PSTMFORCESTANDBY,00006");

delay(100);

if (Serial2.available()) {
Serial.println("GPS Attached Successfully");
this->gps_enabled = true;
Expand All @@ -46,10 +42,8 @@ void GpsInterface::begin() {
char c = Serial2.read();
//Serial.print(c);
//Pass the character to the library
Serial.print(c);
nmea.process(c);
}
Serial.println(nmea.getSentence());
}
else {
this->gps_enabled = false;
Expand Down Expand Up @@ -536,6 +530,10 @@ String GpsInterface::getNumSatsString() {
return (String)num_sats;
}

int GpsInterface::getNumSats() {
return num_sats;
}

bool GpsInterface::getFixStatus() {
return this->good_fix;
}
Expand Down
1 change: 1 addition & 0 deletions esp32_marauder/GpsInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class GpsInterface {
void begin();
void main();

int getNumSats();
String getNumSatsString();
bool getFixStatus();
String getFixStatusAsString();
Expand Down
Loading

0 comments on commit ba92978

Please sign in to comment.