Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #270

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 54 additions & 14 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Pull arduino-esp32 v2.0.4
- name: Pull arduino-esp32
uses: actions/checkout@v2
with:
repository: espressif/arduino-esp32
ref: 2.0.4
path: 2.0.4arduino-esp32
ref: master
path: arduino-esp32

- name: Install TFT_eSPI
uses: actions/checkout@v2
Expand Down Expand Up @@ -79,10 +79,6 @@ jobs:
ref: main
path: CustomSwitchLib

- name: Search for SD lib in arduino-esp32 v2.0.4
run: |
find /home/runner/work/ESP32Marauder/ESP32Marauder/2.0.4arduino-esp32 -name "SD"

- name: Configure TFT_eSPI
run: |
rm -f CustomTFT_eSPI/User_Setup_Select.h
Expand All @@ -99,13 +95,7 @@ jobs:
with:
sketch-names: MarauderOTA.ino
arduino-board-fqbn: esp32:esp32:esp32s2
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.3/package_esp32_dev_index.json

- name: Replace SD lib
run: |
rm -rf /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.3/libraries/SD
cp -R /home/runner/work/ESP32Marauder/ESP32Marauder/2.0.4arduino-esp32/libraries/SD /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.3/libraries/SD
ls -la /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.3/libraries/SD
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.9/package_esp32_dev_index.json

- name: Modify platform.txt
run: |
Expand Down Expand Up @@ -164,6 +154,30 @@ jobs:
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.multiboardS3.bin

- name: Configure configs.h for End Game Board
run: |
pwd
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_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_ENDGAME_S3/ #define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for End Game Board
uses: ArminJo/[email protected]
with:
sketch-names: esp32_marauder.ino
arduino-board-fqbn: esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=enabled
extra-arduino-cli-args: "--warnings none"

- name: Rename Marauder End Game bin
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.end_game_S3.bin

- name: Configure TFT_eSPI and configs.h for OG Marauder
run: |
pwd
Expand All @@ -178,6 +192,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for OG Marauder
uses: ArminJo/[email protected]
Expand All @@ -202,6 +217,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for v6 Marauder
uses: ArminJo/[email protected]
Expand All @@ -226,6 +242,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Kit
uses: ArminJo/[email protected]
Expand All @@ -250,6 +267,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Mini
uses: ArminJo/[email protected]
Expand All @@ -272,6 +290,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for ESP32 LDDB
uses: ArminJo/[email protected]
Expand All @@ -294,6 +313,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Dev Board Pro
uses: ArminJo/[email protected]
Expand All @@ -320,6 +340,7 @@ jobs:
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_ENDGAME_S3/ \/\/#define MARAUDER_ENDGAME_S3/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_M5STICKC/ #define MARAUDER_M5STICKC/' esp32_marauder/configs.h

- name: Build Marauder for Marauder M5StickC
Expand Down Expand Up @@ -358,6 +379,13 @@ jobs:
path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.multiboardS3.bin
retention-days: 5

- name: 'Upload End Game Artifact'
uses: actions/upload-artifact@v3
with:
name: esp32_marauder.end_game_S3.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.end_game_S3.bin
retention-days: 5

- name: 'Upload OG Artifact'
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -455,6 +483,18 @@ jobs:
asset_content_type: application/bin
if: github.event_name != 'pull_request'

- name: Upload End Game Asset
id: upload-end-game-s3-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.esp32s3/esp32_marauder.end_game_S3.bin
asset_name: esp32_marauder.end_game_S3.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'

- name: Upload OG Asset
id: upload-og-release-asset
uses: actions/upload-release-asset@v1
Expand Down
6 changes: 3 additions & 3 deletions esp32_marauder/BatteryInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BatteryInterface::BatteryInterface() {
}

void BatteryInterface::main(uint32_t currentTime) {
#ifndef MARAUDER_FLIPPER
#if !defined(MARAUDER_FLIPPER) && !defined(MARAUDER_ENDGAME_S3)
if (currentTime != 0) {
if (currentTime - initTime >= 3000) {
//Serial.println("Checking Battery Level");
Expand All @@ -22,14 +22,14 @@ void BatteryInterface::main(uint32_t currentTime) {
}

void BatteryInterface::RunSetup() {
#ifndef MARAUDER_FLIPPER
#if !defined(MARAUDER_FLIPPER) && !defined(MARAUDER_ENDGAME_S3)
Wire.begin(I2C_SDA, I2C_SCL);
this->initTime = millis();
#endif
}

int8_t BatteryInterface::getBatteryLevel() {
#ifndef MARAUDER_FLIPPER
#if !defined(MARAUDER_FLIPPER) && !defined(MARAUDER_ENDGAME_S3)
Wire.beginTransmission(IP5306_ADDR);
Wire.write(0x78);
if (Wire.endTransmission(false) == 0 &&
Expand Down
2 changes: 1 addition & 1 deletion esp32_marauder/BatteryInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "configs.h"

#ifndef MARAUDER_FLIPPER
#if !defined(MARAUDER_FLIPPER) && !defined(MARAUDER_ENDGAME_S3)
#include <Wire.h>
#endif

Expand Down
Loading