mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-01-26 03:05:00 -08:00
Compare commits
106 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0d1c048f5 | ||
|
|
94a7c6c587 | ||
|
|
0a395944c6 | ||
|
|
00b27c8e87 | ||
|
|
065e931376 | ||
|
|
9b7d1ab31f | ||
|
|
593dd99d1a | ||
|
|
12794f57bc | ||
|
|
7c73689a13 | ||
|
|
20e70e9343 | ||
|
|
25567aca81 | ||
|
|
0ecc183b59 | ||
|
|
df5e495f3a | ||
|
|
aa5cb56b97 | ||
|
|
cd5d537373 | ||
|
|
868c8a85de | ||
|
|
d3299474c6 | ||
|
|
e662f917bc | ||
|
|
4004e4e6d0 | ||
|
|
cdae54be5a | ||
|
|
4dd856999f | ||
|
|
231d331ff7 | ||
|
|
1cc7b3f620 | ||
|
|
caecd09d74 | ||
|
|
3c5b3bd544 | ||
|
|
4d145d5c0b | ||
|
|
020d0ace3c | ||
|
|
6229ad6d2a | ||
|
|
649f619f87 | ||
|
|
695aed1710 | ||
|
|
76dd3f020d | ||
|
|
60d8a9004b | ||
|
|
84fc9738d4 | ||
|
|
ed65e6d2f7 | ||
|
|
fad44231cf | ||
|
|
974ed246dc | ||
|
|
960c66247d | ||
|
|
39b53e22ba | ||
|
|
1bc2b36c9c | ||
|
|
fe6ab68819 | ||
|
|
f4634638a9 | ||
|
|
e3f32106d9 | ||
|
|
1e5b083d14 | ||
|
|
46dafaa2e4 | ||
|
|
fab8088198 | ||
|
|
e16d421213 | ||
|
|
3ba30ec5d9 | ||
|
|
062cc320d3 | ||
|
|
22058ce83c | ||
|
|
43130cbb42 | ||
|
|
727397f537 | ||
|
|
a2722ea23b | ||
|
|
edbfd62e4c | ||
|
|
5207b18aff | ||
|
|
5d8fba14c1 | ||
|
|
7fd64995bb | ||
|
|
7efa7c8a12 | ||
|
|
6929e3547b | ||
|
|
92cd8933d1 | ||
|
|
78db6eb2d4 | ||
|
|
404ceb03ff | ||
|
|
d9356043bf | ||
|
|
ae8a93a6d2 | ||
|
|
038284c3be | ||
|
|
e394174803 | ||
|
|
e86c5e92e6 | ||
|
|
7827d64a7c | ||
|
|
bfe81f7325 | ||
|
|
584e9457dd | ||
|
|
1cfc3c1f74 | ||
|
|
1bd452ed77 | ||
|
|
19423871a8 | ||
|
|
15faac8cfe | ||
|
|
c2fb967e8b | ||
|
|
d6f17e7566 | ||
|
|
934cd8be1c | ||
|
|
39592cdea4 | ||
|
|
0d398753e0 | ||
|
|
2dc7bc1857 | ||
|
|
0eb03ce0a7 | ||
|
|
cf67f684d1 | ||
|
|
c09f9b81fe | ||
|
|
894f5896b1 | ||
|
|
fcc726d557 | ||
|
|
79e97b2c8a | ||
|
|
e977addc24 | ||
|
|
006df06f7c | ||
|
|
16543bb516 | ||
|
|
7a6d246e25 | ||
|
|
1b318e9031 | ||
|
|
36614f0a57 | ||
|
|
10de34a187 | ||
|
|
0e55083bc0 | ||
|
|
2379aa8b14 | ||
|
|
aee2f545d2 | ||
|
|
80beb7a410 | ||
|
|
2f89097a20 | ||
|
|
abb6af1b98 | ||
|
|
adbae46eae | ||
|
|
0eadac40e5 | ||
|
|
981b2f7f5f | ||
|
|
94e17f834e | ||
|
|
025e19f115 | ||
|
|
410cf31279 | ||
|
|
ec48a8a773 | ||
|
|
73806afbd7 |
236
.github/workflows/build_parallel.yml
vendored
Normal file
236
.github/workflows/build_parallel.yml
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
name: Build and Push Parallel
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
compile_sketch:
|
||||
name: build ${{ matrix.board.name }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board:
|
||||
- { name: "Flipper Zero WiFi Dev Board", flag: "MARAUDER_FLIPPER", fbqn: "esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled", file_name: "flipper", tft: false, tft_file: "", build_dir: "esp32s2", addr: "0x1000" }
|
||||
- { name: "Flipper Zero Multi Board", flag: "MARAUDER_FLIPPER", fbqn: "esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=enabled", file_name: "multiboardS3", tft: false, tft_file: "", build_dir: "esp32s3", addr: "0x0" }
|
||||
- { name: "OG Marauder", flag: "MARAUDER_V4", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "og", tft: true, tft_file: "User_Setup_og_marauder.h", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "Marauder v6", flag: "MARAUDER_V6", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "v6", tft: true, tft_file: "User_Setup_og_marauder.h", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "Marauder v6.1", flag: "MARAUDER_V6_1", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "v6_1", tft: true, tft_file: "User_Setup_og_marauder.h", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "Marauder Kit", flag: "MARAUDER_KIT", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "kit", tft: true, tft_file: "User_Setup_og_marauder.h", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "Marauder Mini", flag: "MARAUDER_MINI", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "mini", tft: true, tft_file: "User_Setup_marauder_mini.h", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "ESP32 LDDB", flag: "ESP32_LDDB", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "esp32_lddb", tft: false, tft_file: "", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "Marauder Dev Board Pro", flag: "MARAUDER_DEV_BOARD_PRO", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "marauder_dev_board_pro", tft: false, tft_file: "", build_dir: "d32", addr: "0x1000" }
|
||||
- { name: "M5StickCPlus", flag: "MARAUDER_M5STICKC", fbqn: "esp32:esp32:m5stick-c:PartitionScheme=min_spiffs", file_name: "m5stickc_plus", tft: true, tft_file: "User_Setup_marauder_m5stickc.h", build_dir: "m5stick-c", addr: "0x1000" }
|
||||
- { name: "M5StickCPlus 2", flag: "MARAUDER_M5STICKCP2", fbqn: "esp32:esp32:m5stick-c:PartitionScheme=min_spiffs", file_name: "m5stickc_plus2", tft: true, tft_file: "User_Setup_marauder_m5stickcp2.h", build_dir: "m5stick-c", addr: "0x1000" }
|
||||
- { name: "Rev Feather", flag: "MARAUDER_REV_FEATHER", fbqn: "esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled", file_name: "rev_feather", tft: true, tft_file: "User_Setup_marauder_rev_feather.h", build_dir: "esp32s2", addr: "0x1000" }
|
||||
- { name: "Marauder v7", flag: "MARAUDER_V7", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "marauder_v7", tft: true, tft_file: "User_Setup_dual_nrf24.h", build_dir: "d32", addr: "0x1000" }
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Arduino CLI
|
||||
run: |
|
||||
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
|
||||
echo "/home/runner/work/ESP32Marauder/ESP32Marauder/bin" >> $GITHUB_PATH
|
||||
export PATH=$PATH:/home/runner/work/ESP32Marauder/ESP32Marauder/bin
|
||||
arduino-cli version
|
||||
|
||||
- name: Install Arduino-ESP32 Core v2.0.11
|
||||
run: |
|
||||
arduino-cli core update-index
|
||||
arduino-cli core install esp32:esp32@2.0.11
|
||||
|
||||
- name: Verify Installed Cores
|
||||
run: arduino-cli core list
|
||||
|
||||
- name: Build TestFile with ESP32 v2.0.11
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
with:
|
||||
sketch-names: TestFile.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Verify Installed Cores Again
|
||||
run: arduino-cli core list
|
||||
|
||||
- name: Show Arduino dir structure
|
||||
run: |
|
||||
find /home/runner/.arduino15/packages/esp32/hardware/
|
||||
|
||||
- name: Install AsyncTCP
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: me-no-dev/AsyncTCP
|
||||
ref: master
|
||||
path: CustomAsyncTCP
|
||||
|
||||
- name: Install MicroNMEA
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: stevemarple/MicroNMEA
|
||||
ref: v2.0.6
|
||||
path: CustomMicroNMEA
|
||||
|
||||
- name: Install ESPAsyncWebServer
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: bigbrodude6119/ESPAsyncWebServer
|
||||
ref: master
|
||||
path: CustomESPAsyncWebServer
|
||||
|
||||
- name: Install TFT_eSPI
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Bodmer/TFT_eSPI
|
||||
ref: V2.5.34
|
||||
path: CustomTFT_eSPI
|
||||
|
||||
- name: Install lv_arduino
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lvgl/lv_arduino
|
||||
ref: 3.0.0
|
||||
path: Customlv_arduino
|
||||
|
||||
- name: Install JPEGDecoder
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Bodmer/JPEGDecoder
|
||||
ref: 1.8.0
|
||||
path: CustomJPEGDecoder
|
||||
|
||||
- name: Install NimBLE-Arduino
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: h2zero/NimBLE-Arduino
|
||||
ref: 1.3.5
|
||||
path: CustomNimBLE-Arduino
|
||||
|
||||
- name: Install Adafruit_NeoPixel
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_NeoPixel
|
||||
ref: 1.10.7
|
||||
path: CustomAdafruit_NeoPixel
|
||||
|
||||
- name: Install ArduinoJson
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: bblanchon/ArduinoJson
|
||||
ref: v6.18.2
|
||||
path: CustomArduinoJson
|
||||
|
||||
- name: Install LinkedList
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ivanseidel/LinkedList
|
||||
ref: v1.3.3
|
||||
path: CustomLinkedList
|
||||
|
||||
- name: Install EspSoftwareSerial
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: plerup/espsoftwareserial
|
||||
ref: 8.1.0
|
||||
path: CustomEspSoftwareSerial
|
||||
|
||||
- name: Install Adafruit_BusIO
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_BusIO
|
||||
ref: 1.15.0
|
||||
path: CustomAdafruit_BusIO
|
||||
|
||||
- name: Install Adafruit_MAX1704X
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_MAX1704X
|
||||
ref: 1.0.2
|
||||
path: CustomAdafruit_MAX1704X
|
||||
|
||||
- name: Configure TFT_eSPI
|
||||
run: |
|
||||
rm -f CustomTFT_eSPI/User_Setup_Select.h
|
||||
cp User*.h CustomTFT_eSPI/
|
||||
pwd
|
||||
ls -la
|
||||
ls -la CustomTFT_eSPI
|
||||
|
||||
- name: Install Esptool
|
||||
run: |
|
||||
pip install esptool
|
||||
|
||||
- name: Modify platform.txt
|
||||
run: |
|
||||
for i in $(find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -name "platform.txt"); do
|
||||
sed -i 's/compiler.c.elf.libs.esp32c3=/compiler.c.elf.libs.esp32c3=-zmuldefs /' "$i"
|
||||
sed -i 's/compiler.c.elf.libs.esp32s3=/compiler.c.elf.libs.esp32s3=-zmuldefs /' "$i"
|
||||
sed -i 's/compiler.c.elf.libs.esp32s2=/compiler.c.elf.libs.esp32s2=-zmuldefs /' "$i"
|
||||
sed -i 's/compiler.c.elf.libs.esp32=/compiler.c.elf.libs.esp32=-zmuldefs /' "$i"
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32c3
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32s3
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32s2
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32
|
||||
done
|
||||
|
||||
- name: Configure TFT_eSPI (if needed)
|
||||
run: |
|
||||
pwd
|
||||
if [[ ${{ matrix.board.tft }} == true ]]; then
|
||||
find /home/runner/ -name "*TFT_eSPI*"
|
||||
sed -i 's/^\/\/#include <${{ matrix.board.tft_file }}>/#include <${{ matrix.board.tft_file }}>/' /home/runner/work/ESP32Marauder/ESP32Marauder/CustomTFT_eSPI/User_Setup_Select.h
|
||||
fi
|
||||
|
||||
- name: Build Marauder for ${{ matrix.board.name }}
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: ${{ matrix.board.fbqn }}
|
||||
extra-arduino-cli-args: "--warnings none --build-property compiler.cpp.extra_flags='-D${{ matrix.board.flag }}'"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder ${{ matrix.board.name }} bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.${{ matrix.board.file_name }}.bin
|
||||
|
||||
# ls -la ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/
|
||||
# esptool.py --chip esp32s3 merge_bin -o ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.${{ matrix.board.file_name }}.bin \
|
||||
# ${{ matrix.board.addr }} ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.ino.bootloader.bin \
|
||||
# 0x8000 ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.ino.partitions.bin \
|
||||
# 0x10000 ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.ino.bin
|
||||
|
||||
- name: Upload ${{ matrix.board.name }} Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.${{ matrix.board.file_name }}.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}/esp32_marauder.${{ matrix.board.file_name }}.bin
|
||||
retention-days: 5
|
||||
|
||||
post_compile_steps:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [compile_sketch]
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: "Marauder Release ${{ github.ref_name }}"
|
||||
tag_name: ${{ github.ref_name }}
|
||||
generate_release_notes: true
|
||||
draft: true
|
||||
files: |
|
||||
esp32_marauder.*.bin
|
||||
89
.github/workflows/build_push.yml
vendored
89
.github/workflows/build_push.yml
vendored
@@ -175,6 +175,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_m5stickcp2.h CustomTFT_eSPI/
|
||||
cp User_Setup_marauder_rev_feather.h CustomTFT_eSPI/
|
||||
cp User_Setup_dual_nrf24.h CustomTFT_eSPI/
|
||||
pwd
|
||||
@@ -502,7 +503,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_M5STICKC/ #define MARAUDER_M5STICKC/' esp32_marauder/configs.h
|
||||
sed -i 's/^ \/\/#define MARAUDER_M5STICKC / #define MARAUDER_M5STICKC /' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder M5StickC
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
@@ -516,7 +517,41 @@ 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 M5StickCP2
|
||||
run: |
|
||||
pwd
|
||||
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/^\/\/#include <User_Setup_marauder_m5stickcp2.h>/#include <User_Setup_marauder_m5stickcp2.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_V7/ \/\/#define MARAUDER_V7/' 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
|
||||
sed -i 's/^ \/\/#define MARAUDER_M5STICKCP2/ #define MARAUDER_M5STICKCP2/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder M5StickCP2
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:m5stick-c:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder M5StickCP2 bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus2.bin
|
||||
|
||||
- name: Configure TFT_eSPI and configs.h for Marauder Rev Feather
|
||||
run: |
|
||||
pwd
|
||||
@@ -524,6 +559,7 @@ jobs:
|
||||
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/^#include <User_Setup_marauder_m5stickcp2.h>/\/\/#include <User_Setup_marauder_m5stickcp2.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
|
||||
@@ -535,7 +571,8 @@ 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_M5STICKC/ \/\/#define MARAUDER_M5STICKC/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_M5STICKC / \/\/#define MARAUDER_M5STICKC /' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_M5STICKCP2/ \/\/#define MARAUDER_M5STICKCP2/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder Rev Feather
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
@@ -570,6 +607,7 @@ jobs:
|
||||
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
|
||||
sed -i 's/^ #define MARAUDER_M5STICKCP2/ \/\/#define MARAUDER_M5STICKCP2/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder v7
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
@@ -589,84 +627,91 @@ jobs:
|
||||
find ./esp32_marauder/build -name "*.bin"
|
||||
|
||||
- name: 'Upload Flipper Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.flipper.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload MultiboardS3 Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.multiboardS3.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.multiboardS3.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload OG Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.og.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.og.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload v6 Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.v6.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload v6_1 Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.v6_1.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6_1.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Kit Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.kit.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.kit.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Mini Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.mini.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.mini.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload ESP32 LDDB Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.mini.bin
|
||||
name: esp32_marauder.esp32_lddb.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.esp32_lddb.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Marauder Dev Board Pro Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.marauder_dev_board_pro.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.marauder_dev_board_pro.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Marauder M5StickC Plus Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.m5stickc_plus.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Marauder M5StickC Plus 2 Artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.m5stickc_plus2.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus2.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Rev Feather Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.rev_feather.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.rev_feather.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Marauder v7 Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32_marauder.marauder_v7.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.marauder_v7.bin
|
||||
@@ -803,7 +848,19 @@ jobs:
|
||||
asset_name: esp32_marauder.m5stickc_plus.bin
|
||||
asset_content_type: application/bin
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
|
||||
- name: Upload Marauder M5StickC Plus 2 Asset
|
||||
id: upload-m5stickc-plus2-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.m5stick-c/esp32_marauder.m5stickc_plus2.bin
|
||||
asset_name: esp32_marauder.m5stickc_plus2.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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,4 +25,4 @@ Download the [latest release](https://github.com/justcallmekoko/ESP32Marauder/re
|
||||
Check out the project [wiki](https://github.com/justcallmekoko/ESP32Marauder/wiki) for a full overview of the ESP32 Marauder
|
||||
|
||||
# For Sale Now
|
||||
You can buy the ESP32 Marauder using [this link](https://www.tindie.com/products/justcallmekoko/esp32-marauder/)
|
||||
You can buy the ESP32 Marauder using [this link](https://www.justcallmekokollc.com)
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
//#include <User_Setup_marauder_mini.h>
|
||||
//#include <User_Setup_marauder_rev_feather.h>
|
||||
//#include <User_Setup_marauder_m5stickc.h>
|
||||
//#include <User_Setup_marauder_m5stickcp2.h>
|
||||
//#include <User_Setup_pocket_sdr.h>
|
||||
#include <User_Setup_dual_nrf24.h>
|
||||
//#include <User_Setup_dual_nrf24.h>
|
||||
//#include <User_Setup_pocket_sdr_2.h>
|
||||
|
||||
//#include <User_Setups/Setup1_ILI9341.h> // Setup file configured for my ILI9341
|
||||
|
||||
391
User_Setup_marauder_m5stickcp2.h
Normal file
391
User_Setup_marauder_m5stickcp2.h
Normal file
@@ -0,0 +1,391 @@
|
||||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
// User defined information reported by "Read_User_Setup" test & diagnostics example
|
||||
#define USER_SETUP_INFO "User_Setup"
|
||||
|
||||
// Define to disable all #warnings in library (can be put in User_Setup_Select.h)
|
||||
//#define DISABLE_ALL_LIBRARY_WARNINGS
|
||||
|
||||
#define CGRAM_OFFSET
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define STM32 to invoke optimised processor support (only for STM32)
|
||||
//#define STM32
|
||||
|
||||
// Defining the STM32 board allows the library to optimise the performance
|
||||
// for UNO compatible "MCUfriend" style shields
|
||||
//#define NUCLEO_64_TFT
|
||||
//#define NUCLEO_144_TFT
|
||||
|
||||
// STM32 8 bit parallel only:
|
||||
// If STN32 Port A or B pins 0-7 are used for 8 bit parallel data bus bits 0-7
|
||||
// then this will improve rendering performance by a factor of ~8x
|
||||
//#define STM_PORTA_DATA_BUS
|
||||
//#define STM_PORTB_DATA_BUS
|
||||
|
||||
// Tell the library to use parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
//#defined TFT_PARALLEL_16_BIT // **** 16 bit parallel ONLY for RP2040 processor ****
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DISPLAY_TYPE // 20MHz maximum SPI
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
//#define ILI9341_DRIVER // Generic driver for common displays
|
||||
//#define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
|
||||
//#define ST7735_DRIVER // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
//#define SSD1351_DRIVER
|
||||
//#define SSD1963_480_DRIVER
|
||||
//#define SSD1963_800_DRIVER
|
||||
//#define SSD1963_800ALT_DRIVER
|
||||
//#define ILI9225_DRIVER
|
||||
//#define GC9A01_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 and GC9A01 display only
|
||||
|
||||
// For ST7735, 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
|
||||
|
||||
// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below
|
||||
|
||||
// #define M5STACK
|
||||
|
||||
// For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
#define TFT_WIDTH 135
|
||||
// #define TFT_WIDTH 172 // ST7789 172 x 320
|
||||
// #define TFT_WIDTH 170 // ST7789 170 x 320
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
// #define TFT_HEIGHT 128
|
||||
#define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
// #define TFT_HEIGHT 240 // GC9A01 240 x 240
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or stray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_ROBOTLCD // For some RobotLCD arduino shields (128x160, BGR, https://docs.arduino.cc/retired/getting-started-guides/TFT)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
//#define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// #define TFT_BL 32 // LED back-light control pin
|
||||
// #define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for ESP8266 NodeMCU ESP-12 is :
|
||||
//
|
||||
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
|
||||
// Display LED to NodeMCU pin VIN (or 5V, see below)
|
||||
// Display SCK to NodeMCU pin D5
|
||||
// Display SDI/MOSI to NodeMCU pin D7
|
||||
// Display DC (RS/AO)to NodeMCU pin D3
|
||||
// Display RESET to NodeMCU pin D4 (or RST, see below)
|
||||
// Display CS to NodeMCU pin D8 (or GND, see below)
|
||||
// Display GND to NodeMCU pin GND (0V)
|
||||
// Display VCC to NodeMCU 5V or 3.3V
|
||||
//
|
||||
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
|
||||
//
|
||||
// The DC (Data Command) pin may be labelled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
//
|
||||
// The NodeMCU D0 pin can be used for RST
|
||||
//
|
||||
//
|
||||
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
|
||||
// If 5V is not available at a pin you can use 3.3V but backlight brightness
|
||||
// will be lower.
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
//#define TFT_MISO PIN_D6 // Automatically assigned with ESP8266 if not defined
|
||||
//#define TFT_MOSI PIN_D7 // Automatically assigned with ESP8266 if not defined
|
||||
//#define TFT_SCLK PIN_D5 // Automatically assigned with ESP8266 if not defined
|
||||
|
||||
//#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
//#define TFT_DC PIN_D3 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
|
||||
//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
|
||||
// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######
|
||||
|
||||
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
|
||||
// but saves pins for other functions. It is best not to connect MISO as some displays
|
||||
// do not tristate that line when chip select is high!
|
||||
// Note: Only one SPI device can share the FLASH SPI lines, so a SPI touch controller
|
||||
// cannot be connected as well to the same SPI signals.
|
||||
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
|
||||
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
|
||||
// In ESP8266 overlap mode the following must be defined
|
||||
|
||||
//#define TFT_SPI_OVERLAP
|
||||
|
||||
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
|
||||
//#define TFT_CS PIN_D3
|
||||
//#define TFT_DC PIN_D5 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######
|
||||
|
||||
// For ESP32 Dev board (only tested with ILI9341 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS 15 // Chip select control pin
|
||||
//#define TFT_DC 2 // Data Command control pin
|
||||
//#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
// For ESP32 Dev board (only tested with GC9A01 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
//#define TFT_MOSI 15 // In some display driver board, it might be written as "SDA" and so on.
|
||||
//#define TFT_SCLK 14
|
||||
//#define TFT_CS 5 // Chip select control pin
|
||||
//#define TFT_DC 27 // Data Command control pin
|
||||
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL 22 // LED back-light
|
||||
|
||||
#define TOUCH_CS -1 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
// For the M5Stack module use these #define lines
|
||||
//#define TFT_MISO 19
|
||||
#define TFT_MOSI 15
|
||||
#define TFT_SCLK 13
|
||||
#define TFT_CS 5 // Chip select control pin
|
||||
#define TFT_DC 14 // Data Command control pin
|
||||
#define TFT_RST 12 // Reset pin (could connect to Arduino RESET pin)
|
||||
#define TFT_BL 27 // LED back-light (required for M5Stack)
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######
|
||||
|
||||
// The library supports 8 bit parallel TFTs with the ESP32, the pin
|
||||
// selection below is compatible with ESP32 boards in UNO format.
|
||||
// Wemos D32 boards need to be modified, see diagram in Tools folder.
|
||||
// Only ILI9481 and ILI9341 based displays have been tested!
|
||||
|
||||
// Parallel bus is only supported for the STM32 and ESP32
|
||||
// Example below is for ESP32 Parallel interface with UNO displays
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// The ESP32 and TFT the pins used for testing are:
|
||||
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
|
||||
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RST 32 // Reset pin, toggles on startup
|
||||
|
||||
//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RD 2 // Read strobe control pin
|
||||
|
||||
//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
//#define TFT_D1 13 // so a single register write sets/clears all bits.
|
||||
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
|
||||
//#define TFT_D3 25 // TFT screen update performance.
|
||||
//#define TFT_D4 17
|
||||
//#define TFT_D5 16
|
||||
//#define TFT_D6 27
|
||||
//#define TFT_D7 14
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR STM32 SPI TFT SETUP ######
|
||||
|
||||
// The TFT can be connected to SPI port 1 or 2
|
||||
//#define TFT_SPI_PORT 1 // SPI port 1 maximum clock rate is 55MHz
|
||||
//#define TFT_MOSI PA7
|
||||
//#define TFT_MISO PA6
|
||||
//#define TFT_SCLK PA5
|
||||
|
||||
//#define TFT_SPI_PORT 2 // SPI port 2 maximum clock rate is 27MHz
|
||||
//#define TFT_MOSI PB15
|
||||
//#define TFT_MISO PB14
|
||||
//#define TFT_SCLK PB13
|
||||
|
||||
// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select
|
||||
//#define TFT_CS D5 // Chip select control pin to TFT CS
|
||||
//#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select)
|
||||
//#define TFT_RST D7 // Reset pin to TFT RST (or RESET)
|
||||
// OR alternatively, we can use STM32 port reference names PXnn
|
||||
//#define TFT_CS PE11 // Nucleo-F767ZI equivalent of D5
|
||||
//#define TFT_DC PE9 // Nucleo-F767ZI equivalent of D6
|
||||
//#define TFT_RST PF13 // Nucleo-F767ZI equivalent of D7
|
||||
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset
|
||||
// Use an Arduino pin for initial testing as connecting to processor reset
|
||||
// may not work (pulse too short at power up?)
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#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
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// For RP2040 processor and SPI displays, uncomment the following line to use the PIO interface.
|
||||
//#define RP2040_PIO_SPI // Leave commented out to use standard RP2040 SPI port interface
|
||||
|
||||
// For RP2040 processor and 8 or 16 bit parallel displays:
|
||||
// The parallel interface write cycle period is derived from a division of the CPU clock
|
||||
// speed so scales with the processor clock. This means that the divider ratio may need
|
||||
// to be increased when overclocking. It may also need to be adjusted dependant on the
|
||||
// display controller type (ILI94341, HX8357C etc). If RP2040_PIO_CLK_DIV is not defined
|
||||
// the library will set default values which may not suit your display.
|
||||
// The display controller data sheet will specify the minimum write cycle period. The
|
||||
// controllers often work reliably for shorter periods, however if the period is too short
|
||||
// the display may not initialise or graphics will become corrupted.
|
||||
// PIO write cycle frequency = (CPU clock/(4 * RP2040_PIO_CLK_DIV))
|
||||
//#define RP2040_PIO_CLK_DIV 1 // 32ns write cycle at 125MHz CPU clock
|
||||
//#define RP2040_PIO_CLK_DIV 2 // 64ns write cycle at 125MHz CPU clock
|
||||
//#define RP2040_PIO_CLK_DIV 3 // 96ns write cycle at 125MHz CPU clock
|
||||
|
||||
// For the RP2040 processor define the SPI port channel used (default 0 if undefined)
|
||||
//#define TFT_SPI_PORT 1 // Set to 0 if SPI0 pins are used, or 1 if spi1 pins used
|
||||
|
||||
// For the STM32 processor define the SPI port channel used (default 1 if undefined)
|
||||
//#define TFT_SPI_PORT 2 // Set to 1 for SPI port 1, or 2 for SPI port 2
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 55000000 // STM32 SPI1 only (SPI2 maximum is 27MHz)
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
|
||||
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
|
||||
// then uncomment the following line:
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
// Comment out the following #define if "SPI Transactions" do not need to be
|
||||
// supported. When commented out the code size will be smaller and sketches will
|
||||
// run slightly faster, so leave it commented out unless you need it!
|
||||
|
||||
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
|
||||
// Transaction support is required if other SPI devices are connected.
|
||||
|
||||
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
|
||||
// so changing it here has no effect
|
||||
|
||||
//#define SUPPORT_TRANSACTIONS
|
||||
@@ -209,7 +209,13 @@ PROGMEM static const unsigned char menu_icons[][66] = {
|
||||
0xBB, 0x63, 0x38, 0x87, 0x3C, 0x3E, 0xFB, 0x0F, 0x3F, 0xFF, 0x81, 0x3F,
|
||||
0xFF, 0x3F, 0x38, 0xFF, 0xFF, 0x3C, 0xFF, 0x07, 0x3E, 0xFF, 0xEB, 0x3F,
|
||||
0xFF, 0xEF, 0x3F, 0xFF, 0xEF, 0x3F, 0xFF, 0xDF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // BLANK: 36
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
/*#ifndef MARAUDER_MINI
|
||||
|
||||
@@ -110,6 +110,14 @@ int8_t BatteryInterface::getBatteryLevel() {
|
||||
|
||||
|
||||
if (this->has_max17048) {
|
||||
return this->maxlipo.cellPercent();
|
||||
float percent = this->maxlipo.cellPercent();
|
||||
|
||||
// Sometimes we dumb
|
||||
if (percent >= 100)
|
||||
return 100;
|
||||
else if (percent <= 0)
|
||||
return 0;
|
||||
else
|
||||
return percent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
#include "FS.h"
|
||||
#include "settings.h"
|
||||
#include "esp_wifi_types.h"
|
||||
#include "configs.h"
|
||||
|
||||
#define BUF_SIZE 3 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 2324 // max len of each recieved packet
|
||||
//#define BUF_SIZE 3 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
//#define SNAP_LEN 2324 // max len of each recieved packet
|
||||
|
||||
//extern bool useSD;
|
||||
|
||||
|
||||
@@ -220,7 +220,9 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// WiFi sniff/scan
|
||||
Serial.println(HELP_EVIL_PORTAL_CMD);
|
||||
Serial.println(HELP_PACKET_COUNT_CMD);
|
||||
Serial.println(HELP_SIGSTREN_CMD);
|
||||
Serial.println(HELP_SCAN_ALL_CMD);
|
||||
Serial.println(HELP_SCANAP_CMD);
|
||||
Serial.println(HELP_SCANSTA_CMD);
|
||||
Serial.println(HELP_SNIFF_RAW_CMD);
|
||||
@@ -239,6 +241,7 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println(HELP_ATTACK_CMD);
|
||||
|
||||
// WiFi Aux
|
||||
Serial.println(HELP_INFO_CMD);
|
||||
Serial.println(HELP_LIST_AP_CMD_A);
|
||||
Serial.println(HELP_LIST_AP_CMD_B);
|
||||
Serial.println(HELP_LIST_AP_CMD_C);
|
||||
@@ -520,6 +523,16 @@ void CommandLine::runCommand(String input) {
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SIG_STREN, TFT_MAGENTA);
|
||||
wifi_scan_obj.renderPacketRate();
|
||||
}
|
||||
// Packet count
|
||||
else if (cmd_args.get(0) == PACKET_COUNT_CMD) {
|
||||
Serial.println("Starting Packet Count Scan. Stop with " + (String)STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PACKET_RATE, TFT_ORANGE);
|
||||
}
|
||||
// Wardrive
|
||||
else if (cmd_args.get(0) == WARDRIVE_CMD) {
|
||||
@@ -593,6 +606,10 @@ void CommandLine::runCommand(String input) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmd_args.get(0) == SCAN_ALL_CMD) {
|
||||
Serial.println("Scanning for APs and Stations. Stop with " + (String)STOPSCAN_CMD);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_AP_STA, TFT_MAGENTA);
|
||||
}
|
||||
else if (cmd_args.get(0) == SCANAP_CMD) {
|
||||
int full_sw = -1;
|
||||
#ifdef HAS_SCREEN
|
||||
@@ -1189,6 +1206,21 @@ void CommandLine::runCommand(String input) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (cmd_args.get(0) == INFO_CMD) {
|
||||
int ap_sw = this->argSearch(&cmd_args, "-a");
|
||||
|
||||
if (ap_sw != -1) {
|
||||
int filter_ap = cmd_args.get(ap_sw + 1).toInt();
|
||||
wifi_scan_obj.RunAPInfo(filter_ap, false);
|
||||
}
|
||||
else {
|
||||
wifi_scan_obj.currentScanMode = SHOW_INFO;
|
||||
#ifdef HAS_SCREEN
|
||||
menu_function_obj.changeMenu(&menu_function_obj.infoMenu);
|
||||
#endif
|
||||
wifi_scan_obj.RunInfo();
|
||||
}
|
||||
}
|
||||
// Select access points or stations
|
||||
else if (cmd_args.get(0) == SEL_CMD) {
|
||||
// Get switches
|
||||
|
||||
@@ -54,7 +54,9 @@ const char PROGMEM NMEA_CMD[] = "nmea";
|
||||
|
||||
// WiFi sniff/scan
|
||||
const char PROGMEM EVIL_PORTAL_CMD[] = "evilportal";
|
||||
const char PROGMEM PACKET_COUNT_CMD[] = "packetcount";
|
||||
const char PROGMEM SIGSTREN_CMD[] = "sigmon";
|
||||
const char PROGMEM SCAN_ALL_CMD[] = "scanall";
|
||||
const char PROGMEM SCANAP_CMD[] = "scanap";
|
||||
const char PROGMEM SCANSTA_CMD[] = "scansta";
|
||||
const char PROGMEM SNIFF_RAW_CMD[] = "sniffraw";
|
||||
@@ -76,6 +78,7 @@ const char PROGMEM ATTACK_TYPE_RR[] = "rickroll";
|
||||
|
||||
// WiFi Aux
|
||||
const char PROGMEM LIST_AP_CMD[] = "list";
|
||||
const char PROGMEM INFO_CMD[] = "info";
|
||||
const char PROGMEM SEL_CMD[] = "select";
|
||||
const char PROGMEM SSID_CMD[] = "ssid";
|
||||
const char PROGMEM SAVE_CMD[] = "save";
|
||||
@@ -109,7 +112,9 @@ const char PROGMEM HELP_NMEA_CMD[] = "nmea";
|
||||
|
||||
// WiFi sniff/scan
|
||||
const char PROGMEM HELP_EVIL_PORTAL_CMD[] = "evilportal [-c start [-w html.html]/sethtml <html.html>]";
|
||||
const char PROGMEM HELP_PACKET_COUNT_CMD[] = "packetcount";
|
||||
const char PROGMEM HELP_SIGSTREN_CMD[] = "sigmon";
|
||||
const char PROGMEM HELP_SCAN_ALL_CMD[] = "scanall";
|
||||
const char PROGMEM HELP_SCANAP_CMD[] = "scanap";
|
||||
const char PROGMEM HELP_SCANSTA_CMD[] = "scansta";
|
||||
const char PROGMEM HELP_SNIFF_RAW_CMD[] = "sniffraw";
|
||||
@@ -130,6 +135,7 @@ const char PROGMEM HELP_LIST_AP_CMD_A[] = "list -s";
|
||||
const char PROGMEM HELP_LIST_AP_CMD_B[] = "list -a";
|
||||
const char PROGMEM HELP_LIST_AP_CMD_C[] = "list -c";
|
||||
const char PROGMEM HELP_LIST_AP_CMD_D[] = "list -t";
|
||||
const char PROGMEM HELP_INFO_CMD[] = "info [-a <index>]";
|
||||
const char PROGMEM HELP_SEL_CMD_A[] = "select -a/-s/-c <index (comma separated)>/-f \"equals <String> or contains <String>\"";
|
||||
const char PROGMEM HELP_SSID_CMD_A[] = "ssid -a [-g <count>/-n <name>]";
|
||||
const char PROGMEM HELP_SSID_CMD_B[] = "ssid -r <index>";
|
||||
|
||||
@@ -189,31 +189,56 @@ void Display::tftDrawYScaleButtons(byte y_scale)
|
||||
key[3].drawButton();
|
||||
}
|
||||
|
||||
void Display::tftDrawChannelScaleButtons(int set_channel)
|
||||
void Display::tftDrawChannelScaleButtons(int set_channel, bool lnd_an)
|
||||
{
|
||||
tft.drawFastVLine(178, 0, 20, TFT_WHITE);
|
||||
tft.setCursor(145, 21); tft.setTextColor(TFT_WHITE); tft.setTextSize(1); tft.print(text10); tft.print(set_channel);
|
||||
if (lnd_an) {
|
||||
tft.drawFastVLine(178, 0, 20, TFT_WHITE);
|
||||
tft.setCursor(145, 21); tft.setTextColor(TFT_WHITE); tft.setTextSize(1); tft.print(text10); tft.print(set_channel);
|
||||
|
||||
key[4].initButton(&tft, // channel - box
|
||||
164,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
20,
|
||||
20,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"-",
|
||||
2);
|
||||
key[5].initButton(&tft, // channel + box
|
||||
193,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
20,
|
||||
20,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"+",
|
||||
2);
|
||||
key[4].initButton(&tft, // channel - box
|
||||
164,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"-",
|
||||
2);
|
||||
key[5].initButton(&tft, // channel + box
|
||||
193,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"+",
|
||||
2);
|
||||
}
|
||||
|
||||
else {
|
||||
key[4].initButton(&tft, // channel - box
|
||||
(EXT_BUTTON_WIDTH / 2) * 6,
|
||||
(STATUS_BAR_WIDTH * 2) + CHAR_WIDTH - 1, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"-",
|
||||
2);
|
||||
key[5].initButton(&tft, // channel + box
|
||||
(EXT_BUTTON_WIDTH / 2) * 10,
|
||||
(STATUS_BAR_WIDTH * 2) + CHAR_WIDTH - 1, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_BLACK, // Outline
|
||||
TFT_BLUE, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"+",
|
||||
2);
|
||||
}
|
||||
|
||||
key[4].setLabelDatum(1, 5, MC_DATUM);
|
||||
key[5].setLabelDatum(1, 5, MC_DATUM);
|
||||
@@ -222,21 +247,37 @@ void Display::tftDrawChannelScaleButtons(int set_channel)
|
||||
key[5].drawButton();
|
||||
}
|
||||
|
||||
void Display::tftDrawExitScaleButtons()
|
||||
void Display::tftDrawExitScaleButtons(bool lnd_an)
|
||||
{
|
||||
//tft.drawFastVLine(178, 0, 20, TFT_WHITE);
|
||||
//tft.setCursor(145, 21); tft.setTextColor(TFT_WHITE); tft.setTextSize(1); tft.print("Channel:"); tft.print(set_channel);
|
||||
|
||||
key[6].initButton(&tft, // Exit box
|
||||
137,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
20,
|
||||
20,
|
||||
TFT_ORANGE, // Outline
|
||||
TFT_RED, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"X",
|
||||
2);
|
||||
if (lnd_an) {
|
||||
|
||||
key[6].initButton(&tft, // Exit box
|
||||
137,
|
||||
10, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_ORANGE, // Outline
|
||||
TFT_RED, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"X",
|
||||
2);
|
||||
}
|
||||
|
||||
else {
|
||||
key[6].initButton(&tft, // Exit box
|
||||
EXT_BUTTON_WIDTH / 2,
|
||||
(STATUS_BAR_WIDTH * 2) + CHAR_WIDTH - 1, // x, y, w, h, outline, fill, text
|
||||
EXT_BUTTON_WIDTH,
|
||||
EXT_BUTTON_WIDTH,
|
||||
TFT_ORANGE, // Outline
|
||||
TFT_RED, // Fill
|
||||
TFT_BLACK, // Text
|
||||
"X",
|
||||
2);
|
||||
}
|
||||
|
||||
key[6].setLabelDatum(1, 5, MC_DATUM);
|
||||
|
||||
@@ -270,8 +311,13 @@ void Display::touchToExit()
|
||||
void Display::clearScreen()
|
||||
{
|
||||
//Serial.println(F("clearScreen()"));
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setCursor(0, 0);
|
||||
#ifndef MARAUDER_V7
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setCursor(0, 0);
|
||||
#else
|
||||
tft.fillRect(0, 0, TFT_WIDTH, TFT_HEIGHT, TFT_BLACK);
|
||||
tft.setCursor(0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
@@ -283,13 +329,42 @@ void Display::scrollScreenBuffer(bool down) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void Display::processAndPrintString(TFT_eSPI& tft, const String& originalString) {
|
||||
// Define colors
|
||||
uint16_t text_color = TFT_GREEN; // Default text color
|
||||
uint16_t background_color = TFT_BLACK; // Default background color
|
||||
|
||||
String new_string = originalString;
|
||||
|
||||
// Check for color macros at the start of the string
|
||||
if (new_string.startsWith(RED_KEY)) {
|
||||
text_color = TFT_RED;
|
||||
new_string.remove(0, strlen(RED_KEY)); // Remove the macro
|
||||
} else if (new_string.startsWith(GREEN_KEY)) {
|
||||
text_color = TFT_GREEN;
|
||||
new_string.remove(0, strlen(GREEN_KEY)); // Remove the macro
|
||||
} else if (new_string.startsWith(CYAN_KEY)) {
|
||||
text_color = TFT_CYAN;
|
||||
new_string.remove(0, strlen(CYAN_KEY)); // Remove the macro
|
||||
} else if (new_string.startsWith(WHITE_KEY)) {
|
||||
text_color = TFT_WHITE;
|
||||
new_string.remove(0, strlen(WHITE_KEY)); // Remove the macro
|
||||
} else if (new_string.startsWith(MAGENTA_KEY)) {
|
||||
text_color = TFT_MAGENTA;
|
||||
new_string.remove(0, strlen(MAGENTA_KEY)); // Remove the macro
|
||||
}
|
||||
|
||||
// Set text color and print the string
|
||||
tft.setTextColor(text_color, background_color);
|
||||
tft.print(new_string);
|
||||
}
|
||||
|
||||
void Display::displayBuffer(bool do_clear)
|
||||
{
|
||||
if (this->display_buffer->size() > 0)
|
||||
{
|
||||
delay(1);
|
||||
|
||||
while (display_buffer->size() > 0)
|
||||
int print_count = 1;
|
||||
while ((display_buffer->size() > 0) && (print_count > 0))
|
||||
{
|
||||
|
||||
#ifndef SCREEN_BUFFER
|
||||
@@ -311,20 +386,22 @@ void Display::displayBuffer(bool do_clear)
|
||||
blank[(18+(yStart - TOP_FIXED_AREA_2) / TEXT_HEIGHT)%19] = xPos;
|
||||
#else
|
||||
xPos = 0;
|
||||
if (this->screen_buffer->size() >= MAX_SCREEN_BUFFER)
|
||||
if (this->screen_buffer->size() >= MAX_SCREEN_BUFFER)
|
||||
this->scrollScreenBuffer();
|
||||
|
||||
screen_buffer->add(display_buffer->shift());
|
||||
|
||||
for (int i = 0; i < this->screen_buffer->size(); i++) {
|
||||
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
|
||||
for (int x = 0; x < TFT_WIDTH / CHAR_WIDTH; x++)
|
||||
tft.print(" ");
|
||||
String spaces = String(' ', TFT_WIDTH / CHAR_WIDTH);
|
||||
tft.print(spaces);
|
||||
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
tft.print(this->screen_buffer->get(i));
|
||||
|
||||
this->processAndPrintString(tft, this->screen_buffer->get(i));
|
||||
}
|
||||
#endif
|
||||
|
||||
print_count--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@
|
||||
#define LV_ADD_SSID 14
|
||||
#define WIFI_ATTACK_BEACON_LIST 15
|
||||
|
||||
#define RED_KEY ";red;"
|
||||
#define GREEN_KEY ";grn;"
|
||||
#define CYAN_KEY ";cyn;"
|
||||
#define MAGENTA_KEY ";mgn;"
|
||||
#define WHITE_KEY ";wht;"
|
||||
|
||||
class Display
|
||||
{
|
||||
private:
|
||||
@@ -58,6 +64,7 @@ class Display
|
||||
#ifdef SCREEN_BUFFER
|
||||
void scrollScreenBuffer(bool down = false);
|
||||
#endif
|
||||
void processAndPrintString(TFT_eSPI& tft, const String& originalString);
|
||||
|
||||
public:
|
||||
Display();
|
||||
@@ -105,8 +112,8 @@ class Display
|
||||
void tftDrawColorKey();
|
||||
void tftDrawXScaleButtons(byte x_scale);
|
||||
void tftDrawYScaleButtons(byte y_scale);
|
||||
void tftDrawChannelScaleButtons(int set_channel);
|
||||
void tftDrawExitScaleButtons();
|
||||
void tftDrawChannelScaleButtons(int set_channel, bool lnd_an = true);
|
||||
void tftDrawExitScaleButtons(bool lnd_an = true);
|
||||
void buildBanner(String msg, int xpos);
|
||||
void clearScreen();
|
||||
void displayBuffer(bool do_clear = false);
|
||||
|
||||
@@ -14,8 +14,6 @@ void EvilPortal::setup() {
|
||||
|
||||
html_files = new LinkedList<String>();
|
||||
|
||||
html_files->add("Back");
|
||||
|
||||
#ifdef HAS_SD
|
||||
if (sd_obj.supported) {
|
||||
sd_obj.listDirToLinkedList(html_files, "/", "html");
|
||||
|
||||
@@ -52,8 +52,9 @@ struct AccessPoint {
|
||||
uint8_t bssid[6];
|
||||
bool selected;
|
||||
LinkedList<char>* beacon;
|
||||
char rssi;
|
||||
LinkedList<uint8_t>* stations;
|
||||
int8_t rssi;
|
||||
LinkedList<uint16_t>* stations;
|
||||
uint16_t packets;
|
||||
};
|
||||
|
||||
class CaptiveRequestHandler : public AsyncWebHandler {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,6 +73,7 @@ extern Settings settings_obj;
|
||||
#define GPS_MENU 33
|
||||
#define DISABLE_TOUCH 34
|
||||
#define FLIPPER 35
|
||||
#define BLANK 36
|
||||
|
||||
PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
|
||||
PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
|
||||
@@ -84,6 +85,7 @@ PROGMEM static void ta_event_cb(lv_obj_t * ta, lv_event_t event);
|
||||
PROGMEM static void add_ssid_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
|
||||
PROGMEM static void html_list_cb(lv_obj_t * btn, lv_event_t event);
|
||||
PROGMEM static void ap_list_cb(lv_obj_t * btn, lv_event_t event);
|
||||
PROGMEM static void ap_info_list_cb(lv_obj_t * btn, lv_event_t event);
|
||||
PROGMEM static void at_list_cb(lv_obj_t * btn, lv_event_t event);
|
||||
PROGMEM static void station_list_cb(lv_obj_t * btn, lv_event_t event);
|
||||
PROGMEM static void setting_dropdown_cb(lv_obj_t * btn, lv_event_t event);
|
||||
@@ -96,7 +98,7 @@ struct Menu;
|
||||
|
||||
// Individual Nodes of a menu
|
||||
|
||||
struct MenuNode {
|
||||
/*struct MenuNode {
|
||||
String name;
|
||||
bool command;
|
||||
uint16_t color;
|
||||
@@ -104,6 +106,16 @@ struct MenuNode {
|
||||
TFT_eSPI_Button* button;
|
||||
bool selected;
|
||||
std::function<void()> callable;
|
||||
};*/
|
||||
|
||||
struct MenuNode {
|
||||
String name;
|
||||
bool command;
|
||||
uint8_t color;
|
||||
uint8_t icon;
|
||||
TFT_eSPI_Button* button;
|
||||
bool selected;
|
||||
std::function<void()> callable;
|
||||
};
|
||||
|
||||
// Full Menus
|
||||
@@ -111,7 +123,7 @@ struct Menu {
|
||||
String name;
|
||||
LinkedList<MenuNode>* list;
|
||||
Menu * parentMenu;
|
||||
uint8_t selected = 0;
|
||||
uint16_t selected = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -121,10 +133,13 @@ class MenuFunctions
|
||||
|
||||
String u_result = "";
|
||||
|
||||
|
||||
float _graph_scale = 1.0;
|
||||
uint32_t initTime = 0;
|
||||
uint8_t menu_start_index = 0;
|
||||
int menu_start_index = 0;
|
||||
uint8_t mini_kb_index = 0;
|
||||
uint8_t old_gps_sat_count = 0;
|
||||
uint8_t max_graph_value = 0;
|
||||
|
||||
// Main menu stuff
|
||||
Menu mainMenu;
|
||||
@@ -141,7 +156,6 @@ class MenuFunctions
|
||||
Menu updateMenu;
|
||||
Menu settingsMenu;
|
||||
Menu specSettingMenu;
|
||||
Menu infoMenu;
|
||||
Menu languageMenu;
|
||||
Menu sdDeleteMenu;
|
||||
|
||||
@@ -164,6 +178,9 @@ class MenuFunctions
|
||||
Menu htmlMenu;
|
||||
Menu miniKbMenu;
|
||||
Menu saveFileMenu;
|
||||
Menu genAPMacMenu;
|
||||
Menu cloneAPMacMenu;
|
||||
Menu setMacMenu;
|
||||
|
||||
// Bluetooth menu stuff
|
||||
Menu bluetoothSnifferMenu;
|
||||
@@ -177,16 +194,23 @@ class MenuFunctions
|
||||
// Menu icons
|
||||
|
||||
|
||||
|
||||
void addNodes(Menu* menu, String name, uint16_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
uint16_t getColor(uint16_t color);
|
||||
void drawAvgLine(int16_t value);
|
||||
void drawMaxLine(int16_t value, uint16_t color);
|
||||
float calculateGraphScale(int16_t value);
|
||||
float graphScaleCheck(const int16_t array[TFT_WIDTH]);
|
||||
void drawGraph(int16_t *values);
|
||||
void renderGraphUI(uint8_t scan_mode = 0);
|
||||
//void addNodes(Menu* menu, String name, uint16_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
void addNodes(Menu* menu, String name, uint8_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
void battery(bool initial = false);
|
||||
void battery2(bool initial = false);
|
||||
void showMenuList(Menu* menu, int layer);
|
||||
String callSetting(String key);
|
||||
void runBoolSetting(String ley);
|
||||
void displaySetting(String key, Menu* menu, int index);
|
||||
void buttonSelected(uint8_t b, int8_t x = -1);
|
||||
void buttonNotSelected(uint8_t b, int8_t x = -1);
|
||||
void buttonSelected(int b, int x = -1);
|
||||
void buttonNotSelected(int b, int x = -1);
|
||||
#if (!defined(HAS_ILI9341) && defined(HAS_BUTTONS))
|
||||
void miniKeyboard(Menu * targetMenu);
|
||||
#endif
|
||||
@@ -213,6 +237,9 @@ class MenuFunctions
|
||||
Menu gpsInfoMenu;
|
||||
#endif
|
||||
|
||||
Menu infoMenu;
|
||||
Menu apInfoMenu;
|
||||
|
||||
Ticker tick;
|
||||
|
||||
uint16_t x = -1, y = -1;
|
||||
@@ -222,6 +249,7 @@ class MenuFunctions
|
||||
|
||||
String loaded_file = "";
|
||||
|
||||
void setGraphScale(float scale);
|
||||
void initLVGL();
|
||||
void deinitLVGL();
|
||||
void selectEPHTMLGFX();
|
||||
@@ -232,7 +260,7 @@ class MenuFunctions
|
||||
void buildButtons(Menu* menu, int starting_index = 0, String button_name = "");
|
||||
void changeMenu(Menu* menu);
|
||||
void drawStatusBar();
|
||||
void displayCurrentMenu(uint8_t start_index = 0);
|
||||
void displayCurrentMenu(int start_index = 0);
|
||||
void main(uint32_t currentTime);
|
||||
void RunSetup();
|
||||
void orientDisplay();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -98,10 +98,16 @@
|
||||
#define BT_SCAN_AIRTAG 43
|
||||
#define BT_SPOOF_AIRTAG 44
|
||||
#define BT_SCAN_FLIPPER 45
|
||||
#define WIFI_SCAN_CHAN_ANALYZER 46
|
||||
#define BT_SCAN_ANALYZER 47
|
||||
#define WIFI_SCAN_PACKET_RATE 48
|
||||
#define WIFI_SCAN_AP_STA 49
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
#define BASE_MULTIPLIER 4
|
||||
|
||||
#define MAX_CHANNEL 14
|
||||
#define ANALYZER_NAME_REFRESH 100 // Number of events to refresh the name
|
||||
|
||||
#define MAX_CHANNEL 14
|
||||
|
||||
extern EvilPortal evil_portal_obj;
|
||||
|
||||
@@ -176,6 +182,9 @@ class WiFiScan
|
||||
// Wardriver thanks to https://github.com/JosephHewitt
|
||||
struct mac_addr mac_history[mac_history_len];
|
||||
|
||||
uint8_t ap_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
|
||||
uint8_t sta_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
|
||||
|
||||
// Settings
|
||||
uint mac_history_cursor = 0;
|
||||
uint8_t channel_hop_delay = 1;
|
||||
@@ -305,6 +314,7 @@ class WiFiScan
|
||||
NimBLEAdvertisementData GetUniversalAdvertisementData(EBLEPayloadType type);
|
||||
#endif
|
||||
|
||||
void addAnalyzerValue(int16_t value, int rssi_avg, int16_t target_array[], int array_size);
|
||||
bool seen_mac(unsigned char* mac);
|
||||
bool mac_cmp(struct mac_addr addr1, struct mac_addr addr2);
|
||||
void save_mac(unsigned char* mac);
|
||||
@@ -320,6 +330,9 @@ class WiFiScan
|
||||
|
||||
void startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_string);
|
||||
|
||||
void signalAnalyzerLoop(uint32_t tick);
|
||||
void channelAnalyzerLoop(uint32_t tick);
|
||||
void packetRateLoop(uint32_t tick);
|
||||
void packetMonitorMain(uint32_t currentTime);
|
||||
void eapolMonitorMain(uint32_t currentTime);
|
||||
void updateMidway();
|
||||
@@ -364,10 +377,22 @@ class WiFiScan
|
||||
|
||||
//LinkedList<ssid>* ssids;
|
||||
|
||||
// Stuff for RAW stats
|
||||
uint32_t mgmt_frames = 0;
|
||||
uint32_t data_frames = 0;
|
||||
|
||||
String analyzer_name_string = "";
|
||||
|
||||
uint8_t analyzer_frames_recvd = 0;
|
||||
|
||||
bool analyzer_name_update = false;
|
||||
|
||||
uint8_t set_channel = 1;
|
||||
|
||||
uint8_t old_channel = 0;
|
||||
|
||||
int16_t _analyzer_value = 0;
|
||||
|
||||
bool orient_display = false;
|
||||
bool wifi_initialized = false;
|
||||
bool ble_initialized = false;
|
||||
@@ -379,13 +404,52 @@ class WiFiScan
|
||||
String dst_mac = "ff:ff:ff:ff:ff:ff";
|
||||
byte src_mac[6] = {};
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
int16_t _analyzer_values[TFT_WIDTH];
|
||||
int16_t _temp_analyzer_values[TFT_WIDTH];
|
||||
#endif
|
||||
|
||||
String current_mini_kb_ssid = "";
|
||||
|
||||
const String alfa = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-=[];',./`\\_+{}:\"<>?~|!@#$%^&*()";
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
|
||||
wifi_init_config_t cfg2 = { \
|
||||
.event_handler = &esp_event_send_internal, \
|
||||
.osi_funcs = &g_wifi_osi_funcs, \
|
||||
.wpa_crypto_funcs = g_wifi_default_wpa_crypto_funcs, \
|
||||
.static_rx_buf_num = 6,\
|
||||
.dynamic_rx_buf_num = 6,\
|
||||
.tx_buf_type = 0,\
|
||||
.static_tx_buf_num = 1,\
|
||||
.dynamic_tx_buf_num = WIFI_DYNAMIC_TX_BUFFER_NUM,\
|
||||
.cache_tx_buf_num = 0,\
|
||||
.csi_enable = false,\
|
||||
.ampdu_rx_enable = false,\
|
||||
.ampdu_tx_enable = false,\
|
||||
.amsdu_tx_enable = false,\
|
||||
.nvs_enable = false,\
|
||||
.nano_enable = WIFI_NANO_FORMAT_ENABLED,\
|
||||
.rx_ba_win = 6,\
|
||||
.wifi_task_core_id = WIFI_TASK_CORE_ID,\
|
||||
.beacon_max_len = 752, \
|
||||
.mgmt_sbuf_num = 8, \
|
||||
.feature_caps = g_wifi_feature_caps, \
|
||||
.sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \
|
||||
.espnow_max_encrypt_num = 0, \
|
||||
.magic = WIFI_INIT_CONFIG_MAGIC\
|
||||
};
|
||||
|
||||
wifi_config_t ap_config;
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
int8_t checkAnalyzerButtons(uint32_t currentTime);
|
||||
#endif
|
||||
void setMac();
|
||||
void renderRawStats();
|
||||
void renderPacketRate();
|
||||
void displayAnalyzerString(String str);
|
||||
String security_int_to_string(int security_type);
|
||||
char* stringToChar(String string);
|
||||
void RunSetup();
|
||||
@@ -405,8 +469,11 @@ class WiFiScan
|
||||
String freeRAM();
|
||||
void changeChannel();
|
||||
void changeChannel(int chan);
|
||||
void RunAPInfo(uint16_t index, bool do_display = true);
|
||||
void RunInfo();
|
||||
//void RunShutdownBLE();
|
||||
void RunSetMac(uint8_t * mac, bool ap = true);
|
||||
void RunGenerateRandomMac(bool ap = true);
|
||||
void RunGenerateSSIDs(int count = 20);
|
||||
void RunClearSSIDs();
|
||||
void RunClearAPs();
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
#define POLISH_POTATO
|
||||
|
||||
//// BOARD TARGETS
|
||||
//#define MARAUDER_M5STICKC
|
||||
//#define MARAUDER_M5STICKC
|
||||
//#define MARAUDER_M5STICKCP2
|
||||
//#define MARAUDER_MINI
|
||||
//#define MARAUDER_V4
|
||||
//#define MARAUDER_V6
|
||||
#define MARAUDER_V6_1
|
||||
//#define MARAUDER_V6_1
|
||||
//#define MARAUDER_V7
|
||||
//#define MARAUDER_KIT
|
||||
//#define GENERIC_ESP32
|
||||
@@ -22,11 +23,15 @@
|
||||
//#define MARAUDER_REV_FEATHER
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.2.0"
|
||||
#define MARAUDER_VERSION "v1.4.1"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
//// HARDWARE NAMES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#define HARDWARE_NAME "M5Stick-C Plus"
|
||||
#elif defined(MARAUDER_M5STICKCP2)
|
||||
#define HARDWARE_NAME "M5Stick-C Plus2"
|
||||
#elif defined(MARAUDER_MINI)
|
||||
#define HARDWARE_NAME "Marauder Mini"
|
||||
#elif defined(MARAUDER_V7)
|
||||
@@ -56,7 +61,7 @@
|
||||
//// END HARDWARE NAMES
|
||||
|
||||
//// BOARD FEATURES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#if defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
//#define FLIPPER_ZERO_HAT
|
||||
#define HAS_BATTERY
|
||||
#define HAS_BT
|
||||
@@ -234,9 +239,14 @@
|
||||
|
||||
//// POWER MANAGEMENT
|
||||
#ifdef HAS_PWR_MGMT
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#if defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
#include "AXP192.h"
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_M5STICKCP2
|
||||
// Prevent StickCP2 from turning off when disconnect USB cable
|
||||
#define POWER_HOLD_PIN 4
|
||||
#endif
|
||||
#endif
|
||||
//// END POWER MANAGEMENT
|
||||
|
||||
@@ -303,16 +313,22 @@
|
||||
#define D_PULL true
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#if defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
#define L_BTN -1
|
||||
#define C_BTN 37
|
||||
#define U_BTN -1
|
||||
#if defined(MARAUDER_M5STICKCP2)
|
||||
#define U_BTN 35
|
||||
#else
|
||||
#define U_BTN -1
|
||||
#endif
|
||||
#define R_BTN -1
|
||||
#define D_BTN 39
|
||||
|
||||
//#define HAS_L
|
||||
//#define HAS_R
|
||||
//#define HAS_U
|
||||
#if defined(MARAUDER_M5STICKCP2)
|
||||
#define HAS_U
|
||||
#endif
|
||||
#define HAS_D
|
||||
#define HAS_C
|
||||
|
||||
@@ -395,6 +411,10 @@
|
||||
#define TFT_HEIGHT 240
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
#define CHAR_WIDTH 6
|
||||
#define SCREEN_WIDTH TFT_HEIGHT // Originally 240
|
||||
#define SCREEN_HEIGHT TFT_WIDTH // Originally 320
|
||||
@@ -412,7 +432,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 6
|
||||
#define BUTTON_ARRAY_LEN 100
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH (TFT_HEIGHT/16)
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -437,6 +457,79 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_M5STICKCP2)
|
||||
#define MARAUDER_M5STICKC // From now on, everything is the same, except for one check in esp32_marauder.ino amd stickc_led.cpp/h
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define TFT_MOSI 15
|
||||
#define TFT_SCLK 13
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 14
|
||||
#define TFT_RST 12
|
||||
#define TFT_BL 27
|
||||
#define TOUCH_CS -1
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 9
|
||||
|
||||
#define BANNER_TEXT_SIZE 1
|
||||
|
||||
#ifndef TFT_WIDTH
|
||||
#define TFT_WIDTH 135
|
||||
#endif
|
||||
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 240
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
#define CHAR_WIDTH 6
|
||||
#define SCREEN_WIDTH TFT_HEIGHT // Originally 240
|
||||
#define SCREEN_HEIGHT TFT_WIDTH // 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 6
|
||||
#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
|
||||
|
||||
|
||||
#ifdef MARAUDER_V4
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
@@ -451,7 +544,12 @@
|
||||
#endif
|
||||
|
||||
#define TFT_SHIELD
|
||||
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH TFT_WIDTH
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT
|
||||
#define HEIGHT_1 TFT_WIDTH
|
||||
@@ -468,7 +566,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 12
|
||||
#define BUTTON_ARRAY_LEN 12
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -509,7 +607,16 @@
|
||||
#endif
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 22
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH TFT_WIDTH
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT
|
||||
#define HEIGHT_1 TFT_WIDTH
|
||||
@@ -526,7 +633,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 12
|
||||
#define BUTTON_ARRAY_LEN 12
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -566,11 +673,15 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 22
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH TFT_WIDTH
|
||||
@@ -589,7 +700,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 12
|
||||
#define BUTTON_ARRAY_LEN 100
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -629,9 +740,14 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define TFT_DIY
|
||||
#define KIT
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH TFT_WIDTH
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT
|
||||
#define HEIGHT_1 TFT_WIDTH
|
||||
@@ -648,7 +764,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 12
|
||||
#define BUTTON_ARRAY_LEN 12
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -700,6 +816,10 @@
|
||||
#define TFT_HEIGHT 128
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
#define CHAR_WIDTH 6
|
||||
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
|
||||
@@ -717,7 +837,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 10
|
||||
#define BUTTON_ARRAY_LEN 100
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH (TFT_HEIGHT/16)
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -767,6 +887,10 @@
|
||||
#define TFT_HEIGHT 135
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
#define CHAR_WIDTH 6
|
||||
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
|
||||
@@ -784,7 +908,7 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 5
|
||||
#define BUTTON_ARRAY_LEN 100
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH (TFT_HEIGHT/16)
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
@@ -997,6 +1121,27 @@
|
||||
#endif
|
||||
//// END SD DEFINITIONS
|
||||
|
||||
//// SPACE SAVING COLORS
|
||||
#define TFTWHITE 1
|
||||
#define TFTCYAN 2
|
||||
#define TFTBLUE 3
|
||||
#define TFTRED 4
|
||||
#define TFTGREEN 5
|
||||
#define TFTGREY 6
|
||||
#define TFTGRAY 7
|
||||
#define TFTMAGENTA 8
|
||||
#define TFTVIOLET 9
|
||||
#define TFTORANGE 10
|
||||
#define TFTYELLOW 11
|
||||
#define TFTLIGHTGREY 12
|
||||
#define TFTPURPLE 13
|
||||
#define TFTNAVY 14
|
||||
#define TFTSILVER 15
|
||||
#define TFTDARKGREY 16
|
||||
#define TFTSKYBLUE 17
|
||||
#define TFTLIME 18
|
||||
//// END SPACE SAVING COLORS
|
||||
|
||||
//// SCREEN STUFF
|
||||
#ifndef HAS_SCREEN
|
||||
|
||||
@@ -1026,29 +1171,29 @@
|
||||
//// MEMORY LOWER LIMIT STUFF
|
||||
// These values are in bytes
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_MINI)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_V7)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_REV_FEATHER)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_V4)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_V6) || defined(MARAUDER_V6_1)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_KIT)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(GENERIC_ESP32)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_FLIPPER)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(ESP32_LDDB)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_DEV_BOARD_PRO)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(XIAO_ESP32_S3)
|
||||
#define MEM_LOWER_LIM 20000
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#endif
|
||||
//// END MEMORY LOWER LIMIT STUFF
|
||||
|
||||
@@ -1104,50 +1249,50 @@
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 4
|
||||
#define GPS_RX 13
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_V4)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 4
|
||||
#define GPS_RX 13
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_KIT)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 4
|
||||
#define GPS_RX 13
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_DEV_BOARD_PRO)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 21
|
||||
#define GPS_RX 17
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_MINI)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 21
|
||||
#define GPS_RX 22
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_V7)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 21
|
||||
#define GPS_RX 22
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_FLIPPER)
|
||||
#define GPS_SERIAL_INDEX 1
|
||||
#define GPS_TX 9
|
||||
#define GPS_RX 21
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
#define GPS_SERIAL_INDEX 1
|
||||
#define GPS_TX 33
|
||||
#define GPS_RX 32
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#elif defined(MARAUDER_REV_FEATHER)
|
||||
#define GPS_SERIAL_INDEX 1
|
||||
#define GPS_TX 6
|
||||
#define GPS_RX 9
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#endif
|
||||
#else
|
||||
#define mac_history_len 512
|
||||
#define mac_history_len 100
|
||||
#endif
|
||||
//// END GPS STUFF
|
||||
|
||||
@@ -1209,4 +1354,20 @@
|
||||
#endif
|
||||
//// END MARAUDER TITLE STUFF
|
||||
|
||||
//// PCAP BUFFER STUFF
|
||||
|
||||
#ifdef MARAUDER_V7
|
||||
#define BUF_SIZE 8 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 4096 // max len of each recieved packet
|
||||
#elif defined(MARAUDER_MINI)
|
||||
#define BUF_SIZE 8 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 4096 // max len of each recieved packet
|
||||
#elif defined(MARAUDER_REV_FEATHER)
|
||||
#define BUF_SIZE 8 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 4096 // max len of each recieved packet
|
||||
#else
|
||||
#define BUF_SIZE 3 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 2324 // max len of each recieved packet
|
||||
#endif
|
||||
//// PCAP BUFFER STUFF
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#include "flipperLED.h"
|
||||
#elif defined(XIAO_ESP32_S3)
|
||||
#include "xiaoLED.h"
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
#elif defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
#include "stickcLED.h"
|
||||
#elif defined(HAS_NEOPIXEL_LED)
|
||||
#include "LedInterface.h"
|
||||
@@ -109,7 +109,7 @@ CommandLine cli_obj;
|
||||
flipperLED flipper_led;
|
||||
#elif defined(XIAO_ESP32_S3)
|
||||
xiaoLED xiao_led;
|
||||
#elif defined(MARAUDER_M5STICKC)
|
||||
#elif defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
stickcLED stickc_led;
|
||||
#else
|
||||
LedInterface led_obj;
|
||||
@@ -148,12 +148,18 @@ void backlightOff() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
esp_spiram_init();
|
||||
|
||||
#ifdef defined(MARAUDER_M5STICKC) && !defined(MARAUDER_M5STICKCP2)
|
||||
axp192_obj.begin();
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_M5STICKCP2) // Prevent StickCP2 from turning off when disconnect USB cable
|
||||
pinMode(POWER_HOLD_PIN, OUTPUT);
|
||||
digitalWrite(POWER_HOLD_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
@@ -341,7 +347,9 @@ void loop()
|
||||
bool mini = false;
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
mini = true;
|
||||
#ifndef HAS_ILI9341
|
||||
mini = true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
@@ -361,20 +369,11 @@ void loop()
|
||||
#endif
|
||||
|
||||
// Update all of our objects
|
||||
/*#ifdef HAS_SCREEN
|
||||
bool do_draw = display_obj.draw_tft;
|
||||
#else
|
||||
bool do_draw = false;
|
||||
#endif*/
|
||||
|
||||
//if ((!do_draw) && (wifi_scan_obj.currentScanMode != ESP_UPDATE))
|
||||
//{
|
||||
cli_obj.main(currentTime);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.main(wifi_scan_obj.currentScanMode);
|
||||
#endif
|
||||
wifi_scan_obj.main(currentTime);
|
||||
//evil_portal_obj.main(wifi_scan_obj.currentScanMode);
|
||||
|
||||
#ifdef HAS_GPS
|
||||
gps_obj.main();
|
||||
@@ -390,7 +389,6 @@ void loop()
|
||||
|
||||
#ifdef HAS_BATTERY
|
||||
battery_obj.main(currentTime);
|
||||
//temp_obj.main(currentTime);
|
||||
#endif
|
||||
settings_obj.main(currentTime);
|
||||
if (((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) && (wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL)) ||
|
||||
@@ -398,7 +396,6 @@ void loop()
|
||||
#ifdef HAS_SCREEN
|
||||
menu_function_obj.main(currentTime);
|
||||
#endif
|
||||
//cli_obj.main(currentTime);
|
||||
}
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.main();
|
||||
@@ -410,29 +407,9 @@ void loop()
|
||||
led_obj.main(currentTime);
|
||||
#endif
|
||||
|
||||
//if (wifi_scan_obj.currentScanMode == OTA_UPDATE)
|
||||
// web_obj.main();
|
||||
#ifdef HAS_SCREEN
|
||||
delay(1);
|
||||
#else
|
||||
delay(50);
|
||||
#endif
|
||||
//}
|
||||
/*else if (wifi_scan_obj.currentScanMode == ESP_UPDATE) {
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.main(wifi_scan_obj.currentScanMode);
|
||||
menu_function_obj.main(currentTime);
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.main();
|
||||
#elif defined(XIAO_ESP32_S3)
|
||||
xiao_led.main();
|
||||
#else
|
||||
led_obj.main(currentTime);
|
||||
#endif
|
||||
|
||||
//cli_obj.main(currentTime);
|
||||
delay(1);
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,53 +1,64 @@
|
||||
#include "stickcLED.h"
|
||||
// NB M5Stick C Plus LED is active low, so digitalWrite() calls are inverted
|
||||
|
||||
#ifdef MARAUDER_M5STICKCP2
|
||||
#define M5LED_ON HIGH
|
||||
#define M5LED_OFF LOW
|
||||
#define STICKC_LED_PIN 19
|
||||
#else
|
||||
#define M5LED_ON LOW
|
||||
#define M5LED_OFF HIGH
|
||||
#define STICKC_LED_PIN 10
|
||||
#endif
|
||||
|
||||
void stickcLED::RunSetup() {
|
||||
pinMode(STICKC_LED_PIN, OUTPUT);
|
||||
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED")) {
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
return;
|
||||
}
|
||||
|
||||
delay(50);
|
||||
|
||||
digitalWrite(STICKC_LED_PIN, LOW);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_ON);
|
||||
delay(500);
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
delay(250);
|
||||
digitalWrite(STICKC_LED_PIN, LOW);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_ON);
|
||||
delay(500);
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
delay(250);
|
||||
digitalWrite(STICKC_LED_PIN, LOW);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_ON);
|
||||
delay(500);
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
}
|
||||
|
||||
void stickcLED::attackLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(STICKC_LED_PIN, LOW);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_ON);
|
||||
delay(300);
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
}
|
||||
|
||||
void stickcLED::sniffLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(STICKC_LED_PIN, LOW);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_ON);
|
||||
delay(300);
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
}
|
||||
|
||||
void stickcLED::offLED() {
|
||||
if (!settings_obj.loadSetting<bool>("EnableLED"))
|
||||
return;
|
||||
|
||||
digitalWrite(STICKC_LED_PIN, HIGH);
|
||||
digitalWrite(STICKC_LED_PIN, M5LED_OFF);
|
||||
}
|
||||
|
||||
void stickcLED::main() {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define STICKC_LED_PIN 10
|
||||
|
||||
extern Settings settings_obj;
|
||||
|
||||
|
||||
@@ -12,6 +12,136 @@ struct mac_addr {
|
||||
struct Station {
|
||||
uint8_t mac[6];
|
||||
bool selected;
|
||||
uint16_t packets;
|
||||
};
|
||||
|
||||
const char apple_ouis[][9] PROGMEM = {
|
||||
"00:17:F2", "00:1E:C2", "00:26:08", "F8:1E:DF", "BC:92:6B",
|
||||
"28:E0:2C", "3C:07:54", "7C:D1:C3", "DC:A9:04", "F0:D1:A9",
|
||||
"C0:2C:5C", "00:03:93", "00:03:94", "00:03:95", "00:03:96",
|
||||
"00:03:97", "00:03:98", "00:03:99", "00:03:9A", "00:03:9B",
|
||||
"00:03:9C", "00:03:9D", "00:03:9E", "00:03:9F", "00:03:A0",
|
||||
"00:03:A1", "00:03:A2", "00:03:A3", "00:03:A4", "00:03:A5",
|
||||
"00:03:A6", "00:03:A7", "00:03:A8", "00:03:A9", "00:03:AA",
|
||||
"00:03:AB", "00:03:AC", "00:03:AD", "00:03:AE", "00:03:AF",
|
||||
"00:03:B0", "00:03:B1", "00:03:B2", "00:03:B3", "00:03:B4",
|
||||
"00:03:B5", "00:03:B6", "00:03:B7", "00:03:B8", "00:03:B9",
|
||||
"00:03:BA", "00:03:BB", "00:03:BC", "00:03:BD", "00:03:BE",
|
||||
"00:03:BF", "00:03:C0", "00:03:C1", "00:03:C2", "00:03:C3",
|
||||
"00:03:C4", "00:03:C5", "00:03:C6", "00:03:C7", "00:03:C8",
|
||||
"00:03:C9", "00:03:CA", "00:03:CB", "00:03:CC", "00:03:CD",
|
||||
"00:03:CE", "00:03:CF", "00:03:D0", "00:03:D1", "00:03:D2",
|
||||
"00:03:D3", "00:03:D4", "00:03:D5", "00:03:D6", "00:03:D7",
|
||||
"00:03:D8", "00:03:D9", "00:03:DA", "00:03:DB", "00:03:DC",
|
||||
"00:03:DD", "00:03:DE", "00:03:DF", "00:03:E0", "00:03:E1",
|
||||
"00:03:E2", "00:03:E3", "00:03:E4", "00:03:E5", "00:03:E6",
|
||||
"00:03:E7", "00:03:E8", "00:03:E9", "00:03:EA", "00:03:EB",
|
||||
"00:03:EC", "00:03:ED", "00:03:EE", "00:03:EF", "00:03:F0",
|
||||
"00:03:F1", "00:03:F2", "00:03:F3", "00:03:F4", "00:03:F5",
|
||||
"00:03:F6", "00:03:F7", "00:03:F8", "00:03:F9", "00:03:FA",
|
||||
"00:03:FB", "00:03:FC", "00:03:FD", "00:03:FE", "00:03:FF"
|
||||
};
|
||||
|
||||
const char asus_ouis[][9] PROGMEM = {
|
||||
"00:0C:6E", "00:0E:A6", "00:11:2F", "00:11:D8", "00:13:D4", "00:15:F2", "00:17:31", "00:18:F3", "00:1A:92",
|
||||
"00:1B:FC", "00:1D:60", "00:1E:8C", "00:1F:C6", "00:22:15", "00:23:54", "00:24:8C", "00:26:18", "00:E0:18",
|
||||
"04:42:1A", "04:92:26", "04:D4:C4", "04:D9:F5", "08:60:6E", "08:62:66", "08:BF:B8", "0C:9D:92", "10:7B:44",
|
||||
"10:7C:61", "10:BF:48", "10:C3:7B", "14:DA:E9", "14:DD:A9", "18:31:BF", "1C:87:2C", "1C:B7:2C", "20:CF:30",
|
||||
"24:4B:FE", "2C:4D:54", "2C:56:DC", "2C:FD:A1", "30:5A:3A", "30:85:A9", "34:97:F6", "38:2C:4A", "38:D5:47",
|
||||
"3C:7C:3F", "40:16:7E", "40:B0:76", "48:5B:39", "4C:ED:FB", "50:46:5D", "50:EB:F6", "54:04:A6", "54:A0:50",
|
||||
"58:11:22", "60:45:CB", "60:A4:4C", "60:CF:84", "70:4D:7B", "70:8B:CD", "74:D0:2B", "78:24:AF", "7C:10:C9",
|
||||
"88:D7:F6", "90:E6:BA", "9C:5C:8E", "A0:36:BC", "A8:5E:45", "AC:22:0B", "AC:9E:17", "B0:6E:BF", "BC:AE:C5",
|
||||
"BC:EE:7B", "C8:60:00", "C8:7F:54", "CC:28:AA", "D0:17:C2", "D4:5D:64", "D8:50:E6", "E0:3F:49", "E0:CB:4E",
|
||||
"E8:9C:25", "F0:2F:74", "F0:79:59", "F4:6D:04", "F8:32:E4", "FC:34:97", "FC:C2:33"
|
||||
};
|
||||
|
||||
const char belkin_ouis[][9] PROGMEM = {
|
||||
"00:11:50", "00:17:3F", "00:30:BD", "08:BD:43", "14:91:82", "24:F5:A2", "30:23:03", "80:69:1A", "94:10:3E",
|
||||
"94:44:52", "B4:75:0E", "C0:56:27", "C4:41:1E", "D8:EC:5E", "E8:9F:80", "EC:1A:59", "EC:22:80"
|
||||
};
|
||||
|
||||
const char cisco_ouis[][9] PROGMEM = {
|
||||
"00:1B:0D", "00:1D:45", "00:1E:7A", "00:25:9C", "00:50:56",
|
||||
"40:55:39", "58:8D:09", "A4:4C:C8", "F8:0F:F9"
|
||||
};
|
||||
|
||||
const char dlink_ouis[][9] PROGMEM = {
|
||||
"00:05:5D", "00:0D:88", "00:0F:3D", "00:11:95", "00:13:46", "00:15:E9", "00:17:9A", "00:19:5B", "00:1B:11",
|
||||
"00:1C:F0", "00:1E:58", "00:21:91", "00:22:B0", "00:24:01", "00:26:5A", "00:AD:24", "04:BA:D6", "08:5A:11",
|
||||
"0C:0E:76", "0C:B6:D2", "10:62:EB", "10:BE:F5", "14:D6:4D", "18:0F:76", "1C:5F:2B", "1C:7E:E5", "1C:AF:F7",
|
||||
"1C:BD:B9", "28:3B:82", "30:23:03", "34:08:04", "34:0A:33", "3C:1E:04", "3C:33:32", "40:86:CB", "40:9B:CD",
|
||||
"54:B8:0A", "5C:D9:98", "60:63:4C", "64:29:43", "6C:19:8F", "6C:72:20", "74:44:01", "74:DA:DA", "78:32:1B",
|
||||
"78:54:2E", "78:98:E8", "80:26:89", "84:C9:B2", "88:76:B9", "90:8D:78", "90:94:E4", "9C:D6:43", "A0:63:91",
|
||||
"A0:AB:1B", "A4:2A:95", "A8:63:7D", "AC:F1:DF", "B4:37:D8", "B8:A3:86", "BC:0F:9A", "BC:22:28", "BC:F6:85",
|
||||
"C0:A0:BB", "C4:A8:1D", "C4:E9:0A", "C8:78:7D", "C8:BE:19", "C8:D3:A3", "CC:B2:55", "D8:FE:E3", "DC:EA:E7",
|
||||
"E0:1C:FC", "E4:6F:13", "E8:CC:18", "EC:22:80", "EC:AD:E0", "F0:7D:68", "F0:B4:D2", "F4:8C:EB", "F8:E9:03",
|
||||
"FC:75:16"
|
||||
};
|
||||
|
||||
const char google_ouis[][9] PROGMEM = {
|
||||
"3C:5A:B4", "5C:BF:C0", "78:4F:43", "A4:77:33", "D4:97:0B", "F0:72:8C"
|
||||
};
|
||||
|
||||
const char huawei_ouis[][9] PROGMEM = {
|
||||
"00:1A:2B", "28:FF:3C", "5C:4C:A9", "8C:71:F8", "C8:D1:5E",
|
||||
"E4:4C:A9", "F4:12:FA"
|
||||
};
|
||||
|
||||
const char lg_ouis[][9] PROGMEM = {
|
||||
"00:17:C0", "18:AF:8F", "38:2D:AE", "5C:87:9C", "68:27:37",
|
||||
"78:5D:C8", "94:65:2D", "A4:77:33", "C4:43:8F"
|
||||
};
|
||||
|
||||
const char linksys_ouis[][9] PROGMEM = {
|
||||
"00:04:5A", "00:06:25", "00:0C:41", "00:0E:08", "00:0F:66", "00:12:17", "00:13:10", "00:14:BF", "00:16:B6",
|
||||
"00:18:39", "00:18:F8", "00:1A:70", "00:1C:10", "00:1D:7E", "00:1E:E5", "00:21:29", "00:22:6B", "00:23:69",
|
||||
"00:25:9C", "00:23:54", "00:24:B2", "00:31:92", "00:5F:67", "10:27:F5", "14:EB:B6", "1C:61:B4", "20:36:26",
|
||||
"28:87:BA", "30:5A:3A", "2C:FD:A1", "30:23:03", "30:46:9A", "40:ED:00", "48:22:54", "50:91:E3", "54:AF:97",
|
||||
"5C:A2:F4", "5C:A6:E6", "5C:E9:31", "60:A4:B7", "68:7F:F0", "6C:5A:B0", "78:8C:B5", "7C:C2:C6", "9C:53:22",
|
||||
"9C:A2:F4", "A8:42:A1", "AC:15:A2", "B0:A7:B9", "B4:B0:24", "C0:06:C3", "CC:68:B6", "E8:48:B8", "F0:A7:31"
|
||||
};
|
||||
|
||||
const char netgear_ouis[][9] PROGMEM = {
|
||||
"00:09:5B", "00:0F:B5", "00:14:6C", "00:1B:2F", "00:1E:2A", "00:1F:33", "00:22:3F", "00:22:4B", "00:26:F2",
|
||||
"00:8E:F2", "08:02:8E", "08:36:C9", "08:BD:43", "10:0C:6B", "10:0D:7F", "10:DA:43", "14:59:C0", "20:4E:7F",
|
||||
"20:E5:2A", "28:80:88", "28:94:01", "28:C6:8E", "2C:30:33", "2C:B0:5D", "30:46:9A", "34:98:B5", "38:94:ED",
|
||||
"3C:37:86", "40:5D:82", "44:A5:6E", "4C:60:DE", "50:4A:6E", "50:6A:03", "54:07:7D", "58:EF:68", "60:38:E0",
|
||||
"6C:B0:CE", "6C:CD:D6", "74:44:01", "80:37:73", "84:1B:5E", "8C:3B:AD", "94:18:65", "9C:3D:CF", "9C:C9:EB",
|
||||
"9C:D3:6D", "A0:04:60", "A0:21:B7", "A0:40:A0", "A4:2B:8C", "B0:39:56", "B0:7F:B9", "B0:B9:8A", "BC:A5:11",
|
||||
"C0:3F:0E", "C0:FF:D4", "C4:04:15", "C4:3D:C7", "C8:9E:43", "CC:40:D0", "DC:EF:09", "E0:46:9A", "E0:46:EE",
|
||||
"E0:91:F5", "E4:F4:C6", "E8:FC:AF", "F8:73:94"
|
||||
};
|
||||
|
||||
const char oneplus_ouis[][9] PROGMEM = {
|
||||
"08:EC:A9", "30:9C:23", "38:78:62", "64:A2:F9", "74:AC:B9",
|
||||
"A8:14:51", "B4:86:55", "D8:CB:8A", "F4:8C:50"
|
||||
};
|
||||
|
||||
const char samsung_ouis[][9] PROGMEM = {
|
||||
"00:12:47", "00:15:99", "00:16:6B", "00:1B:FC", "10:5F:06",
|
||||
"18:59:36", "20:02:AF", "24:4B:03", "38:2D:3D", "40:B8:37",
|
||||
"00:1F:12", "00:1D:0F", "00:1A:9A", "00:19:E1", "00:18:FF",
|
||||
"00:17:77", "00:16:72", "00:14:69", "00:13:65", "00:12:60",
|
||||
"30:37:0D", "40:8C:47", "50:55:5F", "60:47:A1", "70:0A:AD",
|
||||
"80:61:43", "90:48:F7", "A0:4C:CB", "B0:5E:93", "C0:3D:F5",
|
||||
"D0:31:AA", "E0:4F:02", "F0:3B:94"
|
||||
};
|
||||
|
||||
const char sony_ouis[][9] PROGMEM = {
|
||||
"00:19:C5", "00:1B:59", "00:1E:DC", "10:68:3F", "54:42:49",
|
||||
"A8:E3:EE", "B8:F9:34", "CC:5D:4E", "E8:89:2F"
|
||||
};
|
||||
|
||||
const char tplink_ouis[][9] PROGMEM = {
|
||||
"00:31:92", "00:5F:67", "10:27:F5", "14:EB:B6", "1C:61:B4", "20:36:26", "28:87:BA", "30:DE:4B", "34:60:F9",
|
||||
"3C:52:A1", "40:ED:00", "48:22:54", "50:91:E3", "54:AF:97", "5C:62:8B", "5C:A6:E6", "5C:E9:31", "60:A4:B7",
|
||||
"68:7F:F0", "6C:5A:B0", "78:8C:B5", "7C:C2:C6", "9C:53:22", "9C:A2:F4", "A8:42:A1", "AC:15:A2", "B0:A7:B9",
|
||||
"B4:B0:24", "C0:06:C3", "CC:68:B6", "E8:48:B8", "F0:A7:31"
|
||||
};
|
||||
|
||||
const char xiaomi_ouis[][9] PROGMEM = {
|
||||
"04:CF:8C", "18:59:36", "38:1A:2D", "64:B4:73", "78:02:F8",
|
||||
"90:4E:91", "C4:0B:CB", "D0:DB:32"
|
||||
};
|
||||
|
||||
String byteArrayToHexString(const std::vector<uint8_t>& byteArray) {
|
||||
@@ -127,4 +257,63 @@ void convertMacStringToUint8(const String& macStr, uint8_t macAddr[6]) {
|
||||
}
|
||||
}
|
||||
|
||||
// Function to check if the given MAC address matches any known OUI
|
||||
const char* getManufacturer(const char *addr) {
|
||||
static char oui[9]; // Temporary buffer for extracted OUI
|
||||
|
||||
// Extract the first three bytes (OUI) from addr
|
||||
strncpy(oui, addr, 8);
|
||||
oui[8] = '\0'; // Ensure null termination
|
||||
|
||||
// Convert the addr (OUI) to lowercase
|
||||
for (int i = 0; i < 8; i++) {
|
||||
oui[i] = tolower(oui[i]);
|
||||
}
|
||||
|
||||
// Helper macro to check against an array stored in PROGMEM
|
||||
#define CHECK_OUI(manufacturer, list) \
|
||||
for (uint8_t i = 0; i < sizeof(list) / sizeof(list[0]); i++) { \
|
||||
char storedOUI[9]; \
|
||||
strcpy_P(storedOUI, list[i]); \
|
||||
/* Convert the stored OUI to lowercase */ \
|
||||
for (int j = 0; j < 8; j++) { \
|
||||
storedOUI[j] = tolower(storedOUI[j]); \
|
||||
} \
|
||||
if (strcmp(oui, storedOUI) == 0) return manufacturer; \
|
||||
}
|
||||
|
||||
// Check against known manufacturers
|
||||
CHECK_OUI("Apple", apple_ouis);
|
||||
CHECK_OUI("Asus", asus_ouis);
|
||||
CHECK_OUI("Belkin", belkin_ouis);
|
||||
CHECK_OUI("Cisco", cisco_ouis);
|
||||
CHECK_OUI("DLink", dlink_ouis);
|
||||
CHECK_OUI("Google", google_ouis);
|
||||
CHECK_OUI("Huawei", huawei_ouis);
|
||||
CHECK_OUI("LG", lg_ouis);
|
||||
CHECK_OUI("Linksys", linksys_ouis);
|
||||
CHECK_OUI("Netgear", netgear_ouis);
|
||||
CHECK_OUI("OnePlus", oneplus_ouis);
|
||||
CHECK_OUI("Samsung", samsung_ouis);
|
||||
CHECK_OUI("Sony", sony_ouis);
|
||||
CHECK_OUI("TP-Link", tplink_ouis);
|
||||
CHECK_OUI("Xiaomi", xiaomi_ouis);
|
||||
|
||||
return ""; // Return "Unknown" if no match is found
|
||||
}
|
||||
|
||||
String replaceOUIWithManufacturer(const char *sta_addr) {
|
||||
const char *manufacturer = getManufacturer(sta_addr);
|
||||
|
||||
if (manufacturer == nullptr || strlen(manufacturer) == 0) {
|
||||
return String(sta_addr); // Return original if no manufacturer found
|
||||
}
|
||||
|
||||
// Skip the first 8 characters (3 bytes and 2 colons)
|
||||
const char *mac_suffix = sta_addr + 8;
|
||||
|
||||
// Construct the new address: manufacturer + the remaining MAC address (after the first 3 bytes)
|
||||
return String(manufacturer) + mac_suffix;
|
||||
}
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
BIN
mechanical/V7/Inlay/Front_debos.stl
Normal file
BIN
mechanical/V7/Inlay/Front_debos.stl
Normal file
Binary file not shown.
BIN
mechanical/V7/Inlay/v7 Fill.stl
Normal file
BIN
mechanical/V7/Inlay/v7 Fill.stl
Normal file
Binary file not shown.
BIN
mechanical/V7/Inlay/v7 Outline.stl
Normal file
BIN
mechanical/V7/Inlay/v7 Outline.stl
Normal file
Binary file not shown.
BIN
mechanical/V7/JCMK Inlay.stl
Normal file
BIN
mechanical/V7/JCMK Inlay.stl
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user