mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-01-26 11:14:51 -08:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9819a6ba1b | ||
|
|
f170caa9d2 | ||
|
|
3838296173 | ||
|
|
8526e49189 | ||
|
|
a3aff9afd6 | ||
|
|
50033af120 | ||
|
|
2ccb8675dc | ||
|
|
05eb6d74a5 | ||
|
|
c06e104485 | ||
|
|
0a8d9d2d41 | ||
|
|
ab9870219a | ||
|
|
941532eba0 | ||
|
|
c515873fd5 | ||
|
|
1bf0b0e2c1 | ||
|
|
9ea5fbc3eb | ||
|
|
0e8e698254 | ||
|
|
630687359d | ||
|
|
5070b9785d | ||
|
|
b0c8dd5cb4 | ||
|
|
5fa046b599 | ||
|
|
48164bc4ec | ||
|
|
68085fc6a7 | ||
|
|
0f62303018 | ||
|
|
dc7992d040 | ||
|
|
0764625eb1 | ||
|
|
748afc99e8 | ||
|
|
c4e78293a6 | ||
|
|
74cd774718 | ||
|
|
feaae672da | ||
|
|
ba9ec4023e | ||
|
|
7045ce9380 | ||
|
|
69a7d9b24f | ||
|
|
11f2cec1fd | ||
|
|
828d0b1760 | ||
|
|
fc903cc66b |
7
.github/workflows/build_parallel.yml
vendored
7
.github/workflows/build_parallel.yml
vendored
@@ -143,7 +143,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_NeoPixel
|
||||
ref: 1.10.7
|
||||
ref: 1.12.0
|
||||
path: CustomAdafruit_NeoPixel
|
||||
|
||||
- name: Install ArduinoJson
|
||||
@@ -242,16 +242,19 @@ jobs:
|
||||
- name: Rename and Upload ${{ matrix.board.name }} Artifact
|
||||
run: |
|
||||
VERSION=$(grep '#define MARAUDER_VERSION' ./esp32_marauder/configs.h | sed -E 's/.*"v([^"]+)"/v\1/' | tr '.' '_')
|
||||
VERSION_DOT=$(grep '#define MARAUDER_VERSION' ./esp32_marauder/configs.h | sed -E 's/.*"v([^"]+)"/v\1/')
|
||||
DATE=$(date +%Y%m%d)
|
||||
|
||||
BUILD_DIR=./esp32_marauder/build/esp32.esp32.${{ matrix.board.build_dir }}
|
||||
INPUT_BIN=$BUILD_DIR/esp32_marauder.ino.bin
|
||||
OUTPUT_BIN=esp32_marauder_${VERSION}_${DATE}_${{ matrix.board.file_name }}.bin
|
||||
VERSION_DOT=${VERSION_DOT}
|
||||
|
||||
mv "$INPUT_BIN" "$BUILD_DIR/$OUTPUT_BIN"
|
||||
|
||||
echo "artifact_name=$OUTPUT_BIN" >> $GITHUB_ENV
|
||||
echo "artifact_path=$BUILD_DIR/$OUTPUT_BIN" >> $GITHUB_ENV
|
||||
echo "version_dot=$VERSION_DOT" >> $GITHUB_ENV
|
||||
- name: Upload ${{ matrix.board.name }} Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -273,7 +276,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: "Marauder Release ${{ github.ref_name }}"
|
||||
tag_name: ${{ github.ref_name }}
|
||||
tag_name: ${{ env.version_dot }}
|
||||
generate_release_notes: true
|
||||
draft: true
|
||||
files: |
|
||||
|
||||
4
.github/workflows/nightly_build.yml
vendored
4
.github/workflows/nightly_build.yml
vendored
@@ -183,7 +183,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_NeoPixel
|
||||
ref: 1.10.7
|
||||
ref: 1.12.0
|
||||
path: CustomAdafruit_NeoPixel
|
||||
|
||||
- name: Install ArduinoJson
|
||||
@@ -354,7 +354,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ needs.decide.outputs.short_sha }}_nightly
|
||||
tag_name: nightly
|
||||
tag_name: nightly_${{ needs.decide.outputs.short_sha }}
|
||||
prerelease: true
|
||||
generate_release_notes: true
|
||||
draft: false
|
||||
|
||||
@@ -312,7 +312,7 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
menu_function_obj.changeMenu(menu_function_obj.current_menu);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -109,6 +109,47 @@ bool Display::isTouchHeld(uint16_t threshold) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Display::init() {
|
||||
tft.init();
|
||||
|
||||
#ifdef HAS_DUAL_BAND
|
||||
digitalWrite(TFT_BL, HIGH);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Display::setCalData(bool landscape) {
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
if (!landscape) {
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 239, 3560, 262, 3643, 4 };
|
||||
#elif defined(MARAUDER_V8)
|
||||
uint16_t calData[5] = { 351, 3279, 214, 3394, 2 };
|
||||
#elif defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
#endif
|
||||
#ifdef HAS_ILI9341
|
||||
tft.setTouch(calData);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 272, 3648, 234, 3565, 7 };
|
||||
#elif defined(MARAUDER_V8)
|
||||
uint16_t calData[5] = { 213, 3396, 350, 3275, 1 };
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
#endif
|
||||
#ifdef HAS_ILI9341
|
||||
tft.setTouch(calData);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Function to prepare the display and the menus
|
||||
void Display::RunSetup()
|
||||
{
|
||||
@@ -136,14 +177,7 @@ void Display::RunSetup()
|
||||
#ifdef HAS_ILI9341
|
||||
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 239, 3560, 262, 3643, 4 };
|
||||
#elif defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
#endif
|
||||
tft.setTouch(calData);
|
||||
this->setCalData();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -203,11 +237,16 @@ void Display::tftDrawGraphObjects(byte x_scale)
|
||||
tft.setCursor(3, 228); tft.print("0"); // "-" at bottom of y axis
|
||||
}
|
||||
|
||||
void Display::tftDrawEapolColorKey()
|
||||
void Display::tftDrawEapolColorKey(bool filter)
|
||||
{
|
||||
//Display color key
|
||||
tft.setTextSize(1); tft.setTextColor(TFT_WHITE);
|
||||
tft.fillRect(14, 0, 15, 8, TFT_CYAN); tft.setCursor(30, 0); tft.print(" - EAPOL");
|
||||
tft.fillRect(14, 0, 15, 8, TFT_CYAN); tft.setCursor(30, 0); tft.println(" - EAPOL");
|
||||
if (filter) {
|
||||
uint16_t y = tft.getCursorY();
|
||||
tft.setCursor(14, y);
|
||||
tft.println("Filter Active");
|
||||
}
|
||||
}
|
||||
|
||||
void Display::tftDrawColorKey()
|
||||
|
||||
@@ -124,7 +124,7 @@ class Display
|
||||
void tftDrawRedOnOffButton();
|
||||
void tftDrawGreenOnOffButton();
|
||||
void tftDrawGraphObjects(byte x_scale);
|
||||
void tftDrawEapolColorKey();
|
||||
void tftDrawEapolColorKey(bool filter = false);
|
||||
void tftDrawColorKey();
|
||||
void tftDrawXScaleButtons(byte x_scale);
|
||||
void tftDrawYScaleButtons(byte y_scale);
|
||||
@@ -140,6 +140,7 @@ class Display
|
||||
//void jpegRender(int xpos, int ypos);
|
||||
void listDir(fs::FS &fs, const char * dirname, uint8_t levels);
|
||||
void listFiles();
|
||||
void init();
|
||||
void main(uint8_t scan_mode);
|
||||
void RunSetup();
|
||||
void scrollAddress(uint16_t vsp);
|
||||
@@ -149,6 +150,7 @@ class Display
|
||||
void touchToExit();
|
||||
void twoPartDisplay(String center_text);
|
||||
void updateBanner(String msg);
|
||||
void setCalData(bool landscape = false);
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -904,11 +904,12 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_SLEEP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_SLEEP_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_FUNNY_BEACON) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_FUNNY_BEACON) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG_MON) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_FLIPPER) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
@@ -925,10 +926,10 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
changeMenu(current_menu, true);
|
||||
}
|
||||
|
||||
x = -1;
|
||||
@@ -998,11 +999,12 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_SLEEP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_SLEEP_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_FUNNY_BEACON) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_FUNNY_BEACON) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG_MON) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_FLIPPER) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
@@ -1025,7 +1027,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
@@ -1519,6 +1521,8 @@ void MenuFunctions::updateStatusBar()
|
||||
wifi_scan_obj.old_channel = current_channel;
|
||||
#if defined(MARAUDER_MINI) || defined(MARAUDER_M5STICKC) || defined(MARAUDER_REV_FEATHER) || defined(MARAUDER_CARDPUTER)
|
||||
display_obj.tft.fillRect(TFT_WIDTH/4, 0, CHAR_WIDTH * 6, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
#elif defined(HAS_DUAL_BAND)
|
||||
display_obj.tft.fillRect(50, 0, (CHAR_WIDTH / 2) * 8, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
#else
|
||||
display_obj.tft.fillRect(50, 0, (CHAR_WIDTH / 2) * 7, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
#endif
|
||||
@@ -1848,7 +1852,7 @@ void MenuFunctions::drawStatusBar()
|
||||
|
||||
void MenuFunctions::orientDisplay()
|
||||
{
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
|
||||
display_obj.tft.setRotation(SCREEN_ORIENTATION); // Portrait
|
||||
|
||||
@@ -1856,15 +1860,7 @@ void MenuFunctions::orientDisplay()
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 239, 3560, 262, 3643, 4 };
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
#endif
|
||||
|
||||
display_obj.tft.setTouch(calData);
|
||||
display_obj.setCalData();
|
||||
#else
|
||||
display_obj.touchscreen.setRotation(0);
|
||||
#endif
|
||||
@@ -1967,7 +1963,7 @@ void MenuFunctions::RunSetup()
|
||||
|
||||
// Device menu stuff
|
||||
failedUpdateMenu.list = new LinkedList<MenuNode>();
|
||||
whichUpdateMenu.list = new LinkedList<MenuNode>();
|
||||
//whichUpdateMenu.list = new LinkedList<MenuNode>();
|
||||
confirmMenu.list = new LinkedList<MenuNode>();
|
||||
updateMenu.list = new LinkedList<MenuNode>();
|
||||
settingsMenu.list = new LinkedList<MenuNode>();
|
||||
@@ -2036,7 +2032,7 @@ void MenuFunctions::RunSetup()
|
||||
wifiMenu.name = text_table1[7];
|
||||
deviceMenu.name = text_table1[9];
|
||||
failedUpdateMenu.name = text_table1[11];
|
||||
whichUpdateMenu.name = text_table1[12];
|
||||
//whichUpdateMenu.name = text_table1[12];
|
||||
confirmMenu.name = text_table1[13];
|
||||
updateMenu.name = text_table1[15];
|
||||
languageMenu.name = text_table1[16];
|
||||
@@ -2100,9 +2096,11 @@ void MenuFunctions::RunSetup()
|
||||
this->changeMenu(&bluetoothMenu, true);
|
||||
});
|
||||
#ifdef HAS_GPS
|
||||
this->addNodes(&mainMenu, text1_66, TFTRED, NULL, GPS_MENU, [this]() {
|
||||
this->changeMenu(&gpsMenu, true);
|
||||
});
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
this->addNodes(&mainMenu, text1_66, TFTRED, NULL, GPS_MENU, [this]() {
|
||||
this->changeMenu(&gpsMenu, true);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
this->addNodes(&mainMenu, text_table1[9], TFTBLUE, NULL, DEVICE, [this]() {
|
||||
this->changeMenu(&deviceMenu, true);
|
||||
@@ -2723,6 +2721,8 @@ void MenuFunctions::RunSetup()
|
||||
|
||||
wifiStationMenu.list->clear();
|
||||
|
||||
wifiStationMenu.parentMenu = &wifiAPMenu;
|
||||
|
||||
// Add back button to the APs
|
||||
this->addNodes(&wifiStationMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(wifiStationMenu.parentMenu, true);
|
||||
@@ -3070,6 +3070,11 @@ void MenuFunctions::RunSetup()
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
|
||||
});
|
||||
this->addNodes(&bluetoothSnifferMenu, "Airtag Monitor", TFTWHITE, NULL, BLUETOOTH_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG_MON, TFT_WHITE);
|
||||
});
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive", TFTCYAN, NULL, BLUETOOTH_SNIFF, [this]() {
|
||||
@@ -3199,10 +3204,48 @@ void MenuFunctions::RunSetup()
|
||||
this->addNodes(&deviceMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(deviceMenu.parentMenu, true);
|
||||
});
|
||||
this->addNodes(&deviceMenu, text_table1[15], TFTORANGE, NULL, UPDATE, [this]() {
|
||||
/*this->addNodes(&deviceMenu, text_table1[15], TFTORANGE, NULL, UPDATE, [this]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&whichUpdateMenu, true);
|
||||
});
|
||||
});*/
|
||||
|
||||
#ifdef HAS_SD
|
||||
if (sd_obj.supported) {
|
||||
|
||||
sdDeleteMenu.parentMenu = &deviceMenu;
|
||||
|
||||
this->addNodes(&deviceMenu, "Update Firmware", TFTORANGE, NULL, SD_UPDATE, [this]() {
|
||||
display_obj.clearScreen();
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Loading...");
|
||||
|
||||
// Clear menu and lists
|
||||
this->buildSDFileMenu(true);
|
||||
|
||||
this->changeMenu(&sdDeleteMenu, true);
|
||||
});
|
||||
}
|
||||
|
||||
/*if (sd_obj.supported) {
|
||||
addNodes(&whichUpdateMenu, text_table1[40], TFTMAGENTA, NULL, SD_UPDATE, [this]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&confirmMenu, true);
|
||||
});
|
||||
}
|
||||
|
||||
// Confirm SD update menu
|
||||
confirmMenu.parentMenu = &whichUpdateMenu;
|
||||
this->addNodes(&confirmMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(confirmMenu.parentMenu, true);
|
||||
});
|
||||
this->addNodes(&confirmMenu, text14, TFTORANGE, NULL, UPDATE, [this]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&failedUpdateMenu, true);
|
||||
sd_obj.runUpdate();
|
||||
});*/
|
||||
#endif
|
||||
|
||||
this->addNodes(&deviceMenu, "Save/Load Files", TFTCYAN, NULL, SD_UPDATE, [this]() {
|
||||
this->changeMenu(&saveFileMenu, true);
|
||||
@@ -3224,175 +3267,6 @@ void MenuFunctions::RunSetup()
|
||||
|
||||
#ifdef HAS_SD
|
||||
if (sd_obj.supported) {
|
||||
/*this->addNodes(&deviceMenu, "Delete SD Files", TFTCYAN, NULL, SD_UPDATE, [this]() {
|
||||
#ifndef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
this->changeMenu(&sdDeleteMenu);
|
||||
#if !(defined(MARAUDER_V6) || defined(MARAUDER_V6_1) || defined(MARAUDER_CYD_MICRO))
|
||||
|
||||
bool deleting = true;
|
||||
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Loading...");
|
||||
|
||||
while (deleting) {
|
||||
// Build list of files
|
||||
sd_obj.sd_files->clear();
|
||||
delete sd_obj.sd_files;
|
||||
|
||||
sd_obj.sd_files = new LinkedList<String>();
|
||||
|
||||
sd_obj.sd_files->add("Back");
|
||||
|
||||
sd_obj.listDirToLinkedList(sd_obj.sd_files);
|
||||
|
||||
int sd_file_index = 0;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu);
|
||||
this->displayCurrentMenu();
|
||||
|
||||
// Start button loop
|
||||
while(true) {
|
||||
#if !defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
#if (U_BTN >= 0 || defined(MARAUDER_CARDPUTER))
|
||||
#if (U_BTN >= 0)
|
||||
if (u_btn.justPressed()){
|
||||
#elif defined(MARAUDER_CARDPUTER)
|
||||
if (this->isKeyPressed(';')){
|
||||
#endif
|
||||
if (sd_file_index > 0)
|
||||
sd_file_index--;
|
||||
else
|
||||
sd_file_index = sd_obj.sd_files->size() - 1;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu);
|
||||
this->displayCurrentMenu();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if (D_BTN >= 0 || defined(MARAUDER_CARDPUTER))
|
||||
#if (D_BTN >= 0)
|
||||
if (d_btn.justPressed()){
|
||||
#elif defined(MARAUDER_CARDPUTER)
|
||||
if (this->isKeyPressed('.')){
|
||||
#endif
|
||||
if (sd_file_index < sd_obj.sd_files->size() - 1)
|
||||
sd_file_index++;
|
||||
else
|
||||
sd_file_index = 0;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu, 0, sd_obj.sd_files->get(sd_file_index));
|
||||
this->displayCurrentMenu();
|
||||
}
|
||||
#endif
|
||||
#if (C_BTN >= 0) && !defined(MARAUDER_CARDPUTER)
|
||||
if(c_btn.justPressed()){
|
||||
#elif defined(MARAUDER_CARDPUTER)
|
||||
if (this->isKeyPressed('(')) {
|
||||
#endif
|
||||
if (sd_obj.sd_files->get(sd_file_index) != "Back") {
|
||||
if (sd_obj.removeFile("/" + sd_obj.sd_files->get(sd_file_index)))
|
||||
Serial.println("Successfully Removed File: /" + sd_obj.sd_files->get(sd_file_index));
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Deleting /" + sd_obj.sd_files->get(sd_file_index) + "...");
|
||||
}
|
||||
else {
|
||||
this->changeMenu(sdDeleteMenu.parentMenu);
|
||||
deleting = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAS_BUTTONS
|
||||
this->changeMenu(&sdDeleteMenu);
|
||||
bool deleting = true;
|
||||
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Loading...");
|
||||
|
||||
uint16_t t_x = 0, t_y = 0; // To store the touch coordinates
|
||||
|
||||
while (deleting) {
|
||||
// Build list of files
|
||||
sd_obj.sd_files->clear();
|
||||
delete sd_obj.sd_files;
|
||||
|
||||
sd_obj.sd_files = new LinkedList<String>();
|
||||
|
||||
sd_obj.sd_files->add("Back");
|
||||
|
||||
sd_obj.listDirToLinkedList(sd_obj.sd_files);
|
||||
|
||||
int sd_file_index = 0;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu);
|
||||
this->displayCurrentMenu();
|
||||
|
||||
// Start button loop
|
||||
while(true) {
|
||||
#ifdef HAS_ILI9341
|
||||
if (!this->disable_touch)
|
||||
pressed = display_obj.updateTouch(&t_x, &t_y);
|
||||
#endif
|
||||
|
||||
uint8_t menu_button = display_obj.menuButton(&t_x, &t_y, pressed);
|
||||
|
||||
#if !defined(MARAUDER_M5STICKC) || defined(MARAUDER_M5STICKCP2)
|
||||
if (menu_button == UP_BUTTON) {
|
||||
if (sd_file_index > 0)
|
||||
sd_file_index--;
|
||||
else
|
||||
sd_file_index = sd_obj.sd_files->size() - 1;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu);
|
||||
this->displayCurrentMenu();
|
||||
}
|
||||
#endif
|
||||
if (menu_button == DOWN_BUTTON) {
|
||||
if (sd_file_index < sd_obj.sd_files->size() - 1)
|
||||
sd_file_index++;
|
||||
else
|
||||
sd_file_index = 0;
|
||||
|
||||
this->sdDeleteMenu.list->set(0, MenuNode{sd_obj.sd_files->get(sd_file_index), false, TFTCYAN, 0, NULL, true, NULL});
|
||||
this->buildButtons(&sdDeleteMenu, 0, sd_obj.sd_files->get(sd_file_index));
|
||||
this->displayCurrentMenu();
|
||||
}
|
||||
if (menu_button == SELECT_BUTTON) {
|
||||
if (sd_obj.sd_files->get(sd_file_index) != "Back") {
|
||||
if (sd_obj.removeFile("/" + sd_obj.sd_files->get(sd_file_index)))
|
||||
Serial.println("Successfully Removed File: /" + sd_obj.sd_files->get(sd_file_index));
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Deleting /" + sd_obj.sd_files->get(sd_file_index) + "...");
|
||||
}
|
||||
else {
|
||||
this->changeMenu(sdDeleteMenu.parentMenu);
|
||||
deleting = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
});*/
|
||||
|
||||
sdDeleteMenu.parentMenu = &deviceMenu;
|
||||
|
||||
@@ -3577,34 +3451,17 @@ void MenuFunctions::RunSetup()
|
||||
});
|
||||
|
||||
// Select update
|
||||
whichUpdateMenu.parentMenu = &deviceMenu;
|
||||
/*whichUpdateMenu.parentMenu = &deviceMenu;
|
||||
this->addNodes(&whichUpdateMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
this->changeMenu(whichUpdateMenu.parentMenu, true);
|
||||
});
|
||||
#ifdef HAS_SD
|
||||
if (sd_obj.supported) addNodes(&whichUpdateMenu, text_table1[40], TFTMAGENTA, NULL, SD_UPDATE, [this]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&confirmMenu, true);
|
||||
});
|
||||
|
||||
// Confirm SD update menu
|
||||
confirmMenu.parentMenu = &whichUpdateMenu;
|
||||
this->addNodes(&confirmMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(confirmMenu.parentMenu, true);
|
||||
});
|
||||
this->addNodes(&confirmMenu, text14, TFTORANGE, NULL, UPDATE, [this]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&failedUpdateMenu, true);
|
||||
sd_obj.runUpdate();
|
||||
});
|
||||
#endif
|
||||
});*/
|
||||
|
||||
// Web Update
|
||||
updateMenu.parentMenu = &deviceMenu;
|
||||
|
||||
// Failed update menu
|
||||
failedUpdateMenu.parentMenu = &whichUpdateMenu;
|
||||
failedUpdateMenu.parentMenu = &deviceMenu;
|
||||
this->addNodes(&failedUpdateMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
this->changeMenu(failedUpdateMenu.parentMenu, true);
|
||||
@@ -4034,43 +3891,61 @@ void MenuFunctions::RunSetup()
|
||||
}
|
||||
//#endif
|
||||
|
||||
void MenuFunctions::setupSDFileList() {
|
||||
void MenuFunctions::setupSDFileList(bool update) {
|
||||
sd_obj.sd_files->clear();
|
||||
|
||||
delete sd_obj.sd_files;
|
||||
|
||||
sd_obj.sd_files = new LinkedList<String>();
|
||||
|
||||
sd_obj.listDirToLinkedList(sd_obj.sd_files);
|
||||
if (!update)
|
||||
sd_obj.listDirToLinkedList(sd_obj.sd_files);
|
||||
else
|
||||
sd_obj.listDirToLinkedList(sd_obj.sd_files, "/", ".bin");
|
||||
}
|
||||
|
||||
void MenuFunctions::buildSDFileMenu() {
|
||||
this->setupSDFileList();
|
||||
void MenuFunctions::buildSDFileMenu(bool update) {
|
||||
this->setupSDFileList(update);
|
||||
|
||||
sdDeleteMenu.list->clear();
|
||||
delete sdDeleteMenu.list;
|
||||
sdDeleteMenu.list = new LinkedList<MenuNode>();
|
||||
sdDeleteMenu.name = "SD Files";
|
||||
|
||||
if (!update)
|
||||
sdDeleteMenu.name = "SD Files";
|
||||
else
|
||||
sdDeleteMenu.name = "Bin Files";
|
||||
|
||||
this->addNodes(&sdDeleteMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(sdDeleteMenu.parentMenu, true);
|
||||
});
|
||||
|
||||
for (int x = 0; x < sd_obj.sd_files->size(); x++) {
|
||||
this->addNodes(&sdDeleteMenu, sd_obj.sd_files->get(x), TFTCYAN, NULL, SD_UPDATE, [this, x]() {
|
||||
if (sd_obj.removeFile("/" + sd_obj.sd_files->get(x))) {
|
||||
Serial.println("Deleted /" + sd_obj.sd_files->get(x));
|
||||
display_obj.clearScreen();
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Deleting /" + sd_obj.sd_files->get(x) + "...");
|
||||
//sd_obj.sd_files->remove(x);
|
||||
//sdDeleteMenu.list->remove(x + 1); // +1 for "Back"
|
||||
this->buildSDFileMenu();
|
||||
this->changeMenu(&sdDeleteMenu, true);
|
||||
}
|
||||
});
|
||||
if (!update) {
|
||||
for (int x = 0; x < sd_obj.sd_files->size(); x++) {
|
||||
this->addNodes(&sdDeleteMenu, sd_obj.sd_files->get(x), TFTCYAN, NULL, SD_UPDATE, [this, x]() {
|
||||
if (sd_obj.removeFile("/" + sd_obj.sd_files->get(x))) {
|
||||
Serial.println("Deleted /" + sd_obj.sd_files->get(x));
|
||||
display_obj.clearScreen();
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.tft.println("Deleting /" + sd_obj.sd_files->get(x) + "...");
|
||||
//sd_obj.sd_files->remove(x);
|
||||
//sdDeleteMenu.list->remove(x + 1); // +1 for "Back"
|
||||
this->buildSDFileMenu();
|
||||
this->changeMenu(&sdDeleteMenu, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int x = 0; x < sd_obj.sd_files->size(); x++) {
|
||||
this->addNodes(&sdDeleteMenu, sd_obj.sd_files->get(x), TFTCYAN, NULL, SD_UPDATE, [this, x]() {
|
||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||
this->changeMenu(&failedUpdateMenu, true);
|
||||
sd_obj.runUpdate("/" + sd_obj.sd_files->get(x));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4220,7 +4095,7 @@ void MenuFunctions::changeMenu(Menu* menu, bool simple_change) {
|
||||
if (!simple_change) {
|
||||
display_obj.initScrollValues();
|
||||
display_obj.setupScrollArea(TOP_FIXED_AREA, BOT_FIXED_AREA);
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
}
|
||||
current_menu = menu;
|
||||
|
||||
@@ -4229,6 +4104,10 @@ void MenuFunctions::changeMenu(Menu* menu, bool simple_change) {
|
||||
buildButtons(menu);
|
||||
|
||||
displayCurrentMenu();
|
||||
|
||||
//#ifdef MARAUDER_V8
|
||||
// digitalWrite(TFT_BL, HIGH);
|
||||
//#endif
|
||||
}
|
||||
|
||||
void MenuFunctions::buildButtons(Menu *menu, int starting_index, String button_name) {
|
||||
@@ -4364,3 +4243,4 @@ void MenuFunctions::displayCurrentMenu(int start_index)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -223,8 +223,8 @@ class MenuFunctions
|
||||
|
||||
// Menu icons
|
||||
|
||||
void setupSDFileList();
|
||||
void buildSDFileMenu();
|
||||
void setupSDFileList(bool update = false);
|
||||
void buildSDFileMenu(bool update = false);
|
||||
void displayMenuButtons();
|
||||
uint16_t getColor(uint16_t color);
|
||||
void drawAvgLine(int16_t value);
|
||||
|
||||
@@ -165,7 +165,10 @@ void SDInterface::listDir(String str_dir){
|
||||
}
|
||||
}
|
||||
|
||||
void SDInterface::runUpdate() {
|
||||
void SDInterface::runUpdate(String file_name) {
|
||||
if (file_name == "")
|
||||
file_name = "/update.bin";
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
@@ -173,16 +176,18 @@ void SDInterface::runUpdate() {
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
|
||||
display_obj.tft.println(F(text15));
|
||||
display_obj.tft.println("Opening " + file_name + "...");
|
||||
#endif
|
||||
File updateBin = SD.open("/update.bin");
|
||||
|
||||
File updateBin = SD.open(file_name);
|
||||
|
||||
if (updateBin) {
|
||||
if(updateBin.isDirectory()){
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextColor(TFT_RED);
|
||||
display_obj.tft.println(F(text_table2[0]));
|
||||
#endif
|
||||
Serial.println(F("Error, could not find \"update.bin\""));
|
||||
Serial.println("Error, could not find \"" + file_name + "\"");
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ class SDInterface {
|
||||
void listDir(String str_dir);
|
||||
void listDirToLinkedList(LinkedList<String>* file_names, String str_dir = "/", String ext = "");
|
||||
File getFile(String path);
|
||||
void runUpdate();
|
||||
void runUpdate(String file_name = "");
|
||||
void performUpdate(Stream &updateSource, size_t updateSize);
|
||||
void main();
|
||||
bool removeFile(String file_path);
|
||||
|
||||
@@ -223,7 +223,8 @@ extern "C" {
|
||||
|
||||
String display_string = "";
|
||||
|
||||
if (wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) {
|
||||
if ((wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG_MON)) {
|
||||
uint8_t* payLoad = advertisedDevice->getPayload();
|
||||
size_t len = advertisedDevice->getPayloadLength();
|
||||
|
||||
@@ -239,16 +240,23 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
int rssi = advertisedDevice->getRSSI();
|
||||
|
||||
if (match) {
|
||||
String mac = advertisedDevice->getAddress().toString().c_str();
|
||||
mac.toUpperCase();
|
||||
|
||||
for (int i = 0; i < airtags->size(); i++) {
|
||||
if (mac == airtags->get(i).mac)
|
||||
// Airtag is in list already. Update RSSI
|
||||
if (mac == airtags->get(i).mac) {
|
||||
AirTag old_airtag = airtags->get(i);
|
||||
old_airtag.rssi = rssi;
|
||||
old_airtag.last_seen = millis();
|
||||
airtags->set(i, old_airtag);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int rssi = advertisedDevice->getRSSI();
|
||||
Serial.print("RSSI: ");
|
||||
Serial.print(rssi);
|
||||
Serial.print(" MAC: ");
|
||||
@@ -265,22 +273,26 @@ extern "C" {
|
||||
airtag.mac = mac;
|
||||
airtag.payload.assign(payLoad, payLoad + len);
|
||||
airtag.payloadSize = len;
|
||||
airtag.rssi = rssi;
|
||||
airtag.last_seen = millis();
|
||||
|
||||
airtags->add(airtag);
|
||||
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
//display_string.concat("RSSI: ");
|
||||
display_string.concat((String)rssi);
|
||||
display_string.concat(" MAC: ");
|
||||
display_string.concat(mac);
|
||||
uint8_t temp_len = display_string.length();
|
||||
for (uint8_t i = 0; i < 40 - temp_len; i++)
|
||||
{
|
||||
display_string.concat(" ");
|
||||
}
|
||||
display_obj.display_buffer->add(display_string);
|
||||
#endif
|
||||
if (wifi_scan_obj.currentScanMode != BT_SCAN_AIRTAG_MON) {
|
||||
#ifdef HAS_SCREEN
|
||||
//display_string.concat("RSSI: ");
|
||||
display_string.concat((String)rssi);
|
||||
display_string.concat(" MAC: ");
|
||||
display_string.concat(mac);
|
||||
uint8_t temp_len = display_string.length();
|
||||
for (uint8_t i = 0; i < 40 - temp_len; i++)
|
||||
{
|
||||
display_string.concat(" ");
|
||||
}
|
||||
display_obj.display_buffer->add(display_string);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == BT_SCAN_FLIPPER) {
|
||||
@@ -1059,7 +1071,11 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
this->startWiFiAttacks(scan_mode, color, "Sleep Targeted");
|
||||
else if (scan_mode == WIFI_ATTACK_AP_SPAM)
|
||||
this->startWiFiAttacks(scan_mode, color, " AP Beacon Spam ");
|
||||
else if ((scan_mode == BT_SCAN_ALL) || (scan_mode == BT_SCAN_AIRTAG) || (scan_mode == BT_SCAN_FLIPPER) || (scan_mode == BT_SCAN_ANALYZER)){
|
||||
else if ((scan_mode == BT_SCAN_ALL) ||
|
||||
(scan_mode == BT_SCAN_AIRTAG) ||
|
||||
(scan_mode == BT_SCAN_AIRTAG_MON) ||
|
||||
(scan_mode == BT_SCAN_FLIPPER) ||
|
||||
(scan_mode == BT_SCAN_ANALYZER)) {
|
||||
#ifdef HAS_BT
|
||||
RunBluetoothScan(scan_mode, color);
|
||||
#endif
|
||||
@@ -1375,6 +1391,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
|
||||
else if ((currentScanMode == BT_SCAN_ALL) ||
|
||||
(currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(currentScanMode == BT_SCAN_AIRTAG_MON) ||
|
||||
(currentScanMode == BT_SCAN_FLIPPER) ||
|
||||
(currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
@@ -2209,24 +2226,12 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color)
|
||||
void WiFiScan::RunLvJoinWiFi(uint8_t scan_mode, uint16_t color) {
|
||||
|
||||
#ifdef HAS_TOUCH
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
#endif
|
||||
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 272, 3648, 234, 3565, 7 };
|
||||
Serial.println("Using CYD 3.5inch (join wifi)");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
Serial.println("Using TFT DIY (join wifi)");
|
||||
#endif
|
||||
#ifdef HAS_ILI9341
|
||||
display_obj.tft.setTouch(calData);
|
||||
#endif
|
||||
display_obj.setCalData(true);
|
||||
#else
|
||||
//display_obj.touchscreen.setRotation(1);
|
||||
#endif
|
||||
@@ -2822,24 +2827,14 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
if ((scan_mode != WIFI_SCAN_PACKET_RATE) &&
|
||||
(scan_mode != WIFI_SCAN_CHAN_ANALYZER)) {
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 272, 3648, 234, 3565, 7 }; // Landscape
|
||||
Serial.println("Using CYD 3.5inch");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
display_obj.setCalData(true);
|
||||
#else
|
||||
//display_obj.touchscreen.setRotation(1);
|
||||
#endif
|
||||
@@ -2949,7 +2944,7 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#endif
|
||||
@@ -2958,16 +2953,7 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
#ifndef HAS_CYD_TOUCH
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
//Serial.println("Using TFT Shield");
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
uint16_t calData[5] = { 272, 3648, 234, 3565, 7 };
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
//Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
display_obj.setCalData(true);
|
||||
#else
|
||||
//display_obj.touchscreen.setRotation(1);
|
||||
#endif
|
||||
@@ -2980,7 +2966,7 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
|
||||
delay(10);
|
||||
|
||||
display_obj.tftDrawGraphObjects(x_scale); //draw graph objects
|
||||
display_obj.tftDrawEapolColorKey();
|
||||
display_obj.tftDrawEapolColorKey(this->filterActive());
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
#endif
|
||||
@@ -3854,7 +3840,10 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
}
|
||||
NimBLEDevice::init("");
|
||||
pBLEScan = NimBLEDevice::getScan(); //create new scan
|
||||
if ((scan_mode == BT_SCAN_ALL) || (scan_mode == BT_SCAN_AIRTAG) || (scan_mode == BT_SCAN_FLIPPER))
|
||||
if ((scan_mode == BT_SCAN_ALL) ||
|
||||
(scan_mode == BT_SCAN_AIRTAG) ||
|
||||
(scan_mode == BT_SCAN_AIRTAG_MON) ||
|
||||
(scan_mode == BT_SCAN_FLIPPER))
|
||||
{
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
@@ -3868,6 +3857,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.tft.drawCentreString(text_table4[41],TFT_WIDTH / 2,16,2);
|
||||
else if (scan_mode == BT_SCAN_AIRTAG)
|
||||
display_obj.tft.drawCentreString("Airtag Sniff",TFT_WIDTH / 2,16,2);
|
||||
else if (scan_mode == BT_SCAN_AIRTAG_MON)
|
||||
display_obj.tft.drawCentreString("Airtag Monitor",TFT_WIDTH / 2,16,2);
|
||||
else if (scan_mode == BT_SCAN_FLIPPER)
|
||||
display_obj.tft.drawCentreString("Flipper Sniff", TFT_WIDTH / 2, 16, 2);
|
||||
#ifdef HAS_ILI9341
|
||||
@@ -3879,7 +3870,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
#endif
|
||||
if (scan_mode == BT_SCAN_ALL)
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), false);
|
||||
else if (scan_mode == BT_SCAN_AIRTAG) {
|
||||
else if ((scan_mode == BT_SCAN_AIRTAG) || (scan_mode == BT_SCAN_AIRTAG_MON)) {
|
||||
this->clearAirtags();
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), true);
|
||||
}
|
||||
@@ -7381,6 +7372,29 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
|
||||
}
|
||||
|
||||
bool filter = wifi_scan_obj.filterActive();
|
||||
|
||||
// Check for and apply filters
|
||||
if (filter) {
|
||||
bool found = false;
|
||||
int ap_index = -1;
|
||||
|
||||
char addr[] = "00:00:00:00:00:00";
|
||||
getMAC(addr, snifferPacket->payload, 10);
|
||||
ap_index = wifi_scan_obj.checkMatchAP(addr);
|
||||
|
||||
if (ap_index < 0) {
|
||||
char addr2[] = "00:00:00:00:00:00";
|
||||
getMAC(addr2, snifferPacket->payload, 4);
|
||||
ap_index = wifi_scan_obj.checkMatchAP(addr2);
|
||||
}
|
||||
|
||||
if ((ap_index < 0) || (!access_points->get(ap_index).selected))
|
||||
return;
|
||||
|
||||
//Serial.println("Received frame for " + access_points->get(ap_index).essid + ". Processing...");
|
||||
}
|
||||
|
||||
if (( (snifferPacket->payload[30] == 0x88 && snifferPacket->payload[31] == 0x8e)|| ( snifferPacket->payload[32] == 0x88 && snifferPacket->payload[33] == 0x8e) )){
|
||||
num_eapol++;
|
||||
Serial.println("Received EAPOL:");
|
||||
@@ -7498,6 +7512,15 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
buffer_obj.append(snifferPacket, len);
|
||||
}
|
||||
|
||||
bool WiFiScan::filterActive() {
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
int8_t WiFiScan::checkAnalyzerButtons(uint32_t currentTime) {
|
||||
boolean pressed = false;
|
||||
@@ -7541,32 +7564,6 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
y_pos_x = 0;
|
||||
y_pos_y = 0;
|
||||
y_pos_z = 0;
|
||||
/*boolean pressed = false;
|
||||
|
||||
uint16_t t_x = 0, t_y = 0; // To store the touch coordinates
|
||||
|
||||
// Do the touch stuff
|
||||
#ifdef HAS_ILI9341
|
||||
pressed = display_obj.tft.getTouch(&t_x, &t_y);
|
||||
#endif
|
||||
|
||||
// Check buttons for presses
|
||||
for (uint8_t b = 0; b < BUTTON_ARRAY_LEN; b++)
|
||||
{
|
||||
if (pressed && display_obj.key[b].contains(t_x, t_y))
|
||||
{
|
||||
display_obj.key[b].press(true);
|
||||
} else {
|
||||
display_obj.key[b].press(false);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Which buttons pressed
|
||||
//for (uint8_t b = 0; b < BUTTON_ARRAY_LEN; b++)
|
||||
//{
|
||||
// if (display_obj.key[b].justReleased())
|
||||
// {
|
||||
// do_break = true;
|
||||
|
||||
int8_t b = this->checkAnalyzerButtons(currentTime);
|
||||
|
||||
@@ -7600,7 +7597,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
else if (b == 6) {
|
||||
Serial.println("Exiting packet monitor...");
|
||||
this->StartScan(WIFI_SCAN_OFF);
|
||||
//display_obj.tft.init();
|
||||
//display_obj.init();
|
||||
this->orient_display = true;
|
||||
return;
|
||||
}
|
||||
@@ -7615,6 +7612,12 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
Serial.println("Max EAPOL number reached. Adjusting...");
|
||||
num_eapol = 0;
|
||||
}
|
||||
|
||||
// Also change channel while we're at it
|
||||
this->channelHop(true);
|
||||
display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK);
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
|
||||
//CODE FOR PLOTTING CONTINUOUS LINES!!!!!!!!!!!!
|
||||
//Plot "X" value
|
||||
@@ -7651,7 +7654,7 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
display_obj.tft.fillRect(12, 0, 90, 32, TFT_BLACK); // key
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
display_obj.tftDrawEapolColorKey();
|
||||
display_obj.tftDrawEapolColorKey(this->filterActive());
|
||||
display_obj.tftDrawGraphObjects(x_scale);
|
||||
}
|
||||
|
||||
@@ -7878,20 +7881,72 @@ void WiFiScan::changeChannel()
|
||||
}
|
||||
|
||||
// Function to cycle to the next channel
|
||||
void WiFiScan::channelHop()
|
||||
void WiFiScan::channelHop(bool filtered)
|
||||
{
|
||||
#ifndef HAS_DUAL_BAND
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > 14) {
|
||||
this->set_channel = 1;
|
||||
}
|
||||
#else
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
if (this->dual_band_channel_index >= DUAL_BAND_CHANNELS)
|
||||
this->dual_band_channel_index = 0;
|
||||
else
|
||||
this->dual_band_channel_index++;
|
||||
#endif
|
||||
bool channel_match = false;
|
||||
bool ap_selected = true;
|
||||
|
||||
if (!filtered) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > 14) {
|
||||
this->set_channel = 1;
|
||||
}
|
||||
#else
|
||||
if (this->dual_band_channel_index >= DUAL_BAND_CHANNELS)
|
||||
this->dual_band_channel_index = 0;
|
||||
else
|
||||
this->dual_band_channel_index++;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
while ((!channel_match) && (ap_selected)) {
|
||||
ap_selected = false;
|
||||
|
||||
// Pick channel like normal
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > 14) {
|
||||
this->set_channel = 1;
|
||||
}
|
||||
|
||||
// Check if it matches a selected AP's channel
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected) {
|
||||
ap_selected = true;
|
||||
if (access_points->get(i).channel == this->set_channel) {
|
||||
channel_match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
while ((!channel_match) && (ap_selected)) {
|
||||
ap_selected = false;
|
||||
|
||||
// Pick channel like normal
|
||||
if (this->dual_band_channel_index >= DUAL_BAND_CHANNELS)
|
||||
this->dual_band_channel_index = 0;
|
||||
else
|
||||
this->dual_band_channel_index++;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
|
||||
// Check if it matches a selected AP's channel
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected) {
|
||||
ap_selected = true;
|
||||
if (access_points->get(i).channel == this->set_channel) {
|
||||
Serial.println("Setting to channel " + (String)this->set_channel + " for AP " + access_points->get(i).essid);
|
||||
channel_match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
esp_wifi_set_channel(this->set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
delay(1);
|
||||
@@ -7924,24 +7979,46 @@ void WiFiScan::signalAnalyzerLoop(uint32_t tick) {
|
||||
return;
|
||||
}
|
||||
else if (b == 4) {
|
||||
if (set_channel > 1) {
|
||||
set_channel--;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (set_channel > 1) {
|
||||
set_channel--;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->dual_band_channel_index > 1) {
|
||||
this->dual_band_channel_index--;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Channel + button pressed
|
||||
else if (b == 5) {
|
||||
if (set_channel < MAX_CHANNEL) {
|
||||
set_channel++;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (set_channel < MAX_CHANNEL) {
|
||||
set_channel++;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->dual_band_channel_index < DUAL_BAND_CHANNELS - 1) {
|
||||
this->dual_band_channel_index++;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -7968,24 +8045,46 @@ void WiFiScan::channelAnalyzerLoop(uint32_t tick) {
|
||||
return;
|
||||
}
|
||||
else if (b == 4) {
|
||||
if (set_channel > 1) {
|
||||
set_channel--;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(set_channel);
|
||||
return;
|
||||
}
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (set_channel > 1) {
|
||||
set_channel--;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(set_channel);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->dual_band_channel_index > 1) {
|
||||
this->dual_band_channel_index--;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(this->set_channel);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Channel + button pressed
|
||||
else if (b == 5) {
|
||||
if (set_channel < MAX_CHANNEL) {
|
||||
set_channel++;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(set_channel);
|
||||
return;
|
||||
}
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (set_channel < MAX_CHANNEL) {
|
||||
set_channel++;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(set_channel);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->dual_band_channel_index < DUAL_BAND_CHANNELS - 1) {
|
||||
this->dual_band_channel_index++;
|
||||
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
changeChannel(this->set_channel);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -8500,6 +8599,28 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
else if (currentScanMode == WIFI_SCAN_RDP) {
|
||||
this->pingScan(WIFI_SCAN_RDP);
|
||||
}
|
||||
else if (currentScanMode == BT_SCAN_AIRTAG_MON) {
|
||||
if (currentTime - initTime >= this->channel_hop_delay * 500) {
|
||||
initTime = millis();
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.fillRect(0,
|
||||
(STATUS_BAR_WIDTH * 2) + 1 + EXT_BUTTON_WIDTH,
|
||||
TFT_WIDTH,
|
||||
TFT_HEIGHT - STATUS_BAR_WIDTH + 1,
|
||||
TFT_BLACK);
|
||||
|
||||
display_obj.tft.setCursor(0, (STATUS_BAR_WIDTH * 2) + CHAR_WIDTH + EXT_BUTTON_WIDTH);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
|
||||
for (int y = 0; y < airtags->size(); y++) {
|
||||
float last_seen_sec = (millis() - airtags->get(y).last_seen) / 1000;
|
||||
display_obj.tft.println((String)airtags->get(y).rssi + " " + (String)last_seen_sec + "s " + airtags->get(y).mac);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_SIG_STREN) {
|
||||
#ifdef HAS_ILI9341
|
||||
this->signalAnalyzerLoop(currentTime);
|
||||
@@ -8529,13 +8650,6 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
else if ((currentScanMode == WIFI_SCAN_CHAN_ANALYZER) ||
|
||||
(currentScanMode == BT_SCAN_ANALYZER)) {
|
||||
this->channelAnalyzerLoop(currentTime);
|
||||
#ifdef HAS_ILI9341
|
||||
if (currentTime - initTime >= this->channel_hop_delay * 1000)
|
||||
{
|
||||
initTime = millis();
|
||||
channelHop();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if ((currentScanMode == WIFI_SCAN_PACKET_RATE) ||
|
||||
(currentScanMode == WIFI_SCAN_RAW_CAPTURE)) {
|
||||
@@ -8657,10 +8771,9 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
#endif
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) {
|
||||
if (currentTime - initTime >= this->channel_hop_delay * 1000)
|
||||
{
|
||||
if (currentTime - initTime >= 1000) {
|
||||
initTime = millis();
|
||||
channelHop();
|
||||
this->channelHop(true);
|
||||
}
|
||||
#ifdef HAS_SCREEN
|
||||
eapolMonitorMain(currentTime);
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
#define WIFI_SCAN_SMTP 67
|
||||
#define WIFI_SCAN_RDP 68
|
||||
#define WIFI_HOSTSPOT 69 // Nice
|
||||
#define BT_SCAN_AIRTAG_MON 70
|
||||
|
||||
#define WIFI_ATTACK_FUNNY_BEACON 99
|
||||
|
||||
@@ -216,6 +217,8 @@ struct AirTag {
|
||||
std::vector<uint8_t> payload; // Payload data
|
||||
uint16_t payloadSize;
|
||||
bool selected;
|
||||
int8_t rssi;
|
||||
uint32_t last_seen;
|
||||
};
|
||||
|
||||
struct Flipper {
|
||||
@@ -699,6 +702,7 @@ class WiFiScan
|
||||
#ifdef HAS_SCREEN
|
||||
int8_t checkAnalyzerButtons(uint32_t currentTime);
|
||||
#endif
|
||||
bool filterActive();
|
||||
bool RunGPSInfo(bool tracker = false, bool display = true, bool poi = false);
|
||||
void logPoint(String lat, String lon, float alt, String datetime, bool poi = false);
|
||||
void setMac();
|
||||
@@ -744,7 +748,7 @@ class WiFiScan
|
||||
void RunSaveATList(bool save_as = true);
|
||||
void RunLoadATList();
|
||||
void RunSetupGPSTracker(uint8_t scan_mode);
|
||||
void channelHop();
|
||||
void channelHop(bool filtered = false);
|
||||
uint8_t currentScanMode = 0;
|
||||
void main(uint32_t currentTime);
|
||||
void StartScan(uint8_t scan_mode, uint16_t color = 0);
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
//#define MARAUDER_CYD_3_5_INCH
|
||||
//#define MARAUDER_C5
|
||||
//#define MARAUDER_CARDPUTER
|
||||
//#define MARAUDER_V8
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.8.7"
|
||||
#define MARAUDER_VERSION "v1.8.9"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
@@ -80,6 +81,8 @@
|
||||
#define HARDWARE_NAME "XIAO ESP32 S3"
|
||||
#elif defined(MARAUDER_C5)
|
||||
#define HARDWARE_NAME "ESP32-C5 DevKit"
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define HARDWARE_NAME "Marauder v8"
|
||||
#else
|
||||
#define HARDWARE_NAME "ESP32"
|
||||
#endif
|
||||
@@ -417,6 +420,26 @@
|
||||
//#define HAS_PSRAM
|
||||
//#define HAS_TEMP_SENSOR
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define HAS_TOUCH
|
||||
//#define HAS_FLIPPER_LED
|
||||
//#define FLIPPER_ZERO_HAT
|
||||
#define HAS_BATTERY
|
||||
//#define HAS_BT
|
||||
//#define HAS_BUTTONS
|
||||
#define HAS_NEOPIXEL_LED
|
||||
//#define HAS_PWR_MGMT
|
||||
#define HAS_SCREEN
|
||||
#define HAS_FULL_SCREEN
|
||||
#define HAS_GPS
|
||||
#define HAS_C5_SD
|
||||
#define HAS_SD
|
||||
#define USE_SD
|
||||
#define HAS_DUAL_BAND
|
||||
#define HAS_PSRAM
|
||||
//#define HAS_TEMP_SENSOR
|
||||
#endif
|
||||
//// END BOARD FEATURES
|
||||
|
||||
//// POWER MANAGEMENT
|
||||
@@ -987,7 +1010,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef MARAUDER_CYD_MICRO
|
||||
#define TFT_DIY
|
||||
#define TFT_DIY
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
@@ -1040,6 +1063,78 @@
|
||||
|
||||
#define STATUSBAR_COLOR 0x4A49
|
||||
|
||||
#define KIT_LED_BUILTIN 13
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_V8)
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
|
||||
#define BANNER_TEXT_SIZE 2
|
||||
|
||||
#ifndef TFT_WIDTH
|
||||
#define TFT_WIDTH 240
|
||||
#endif
|
||||
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
//#ifndef MARAUDER_CYD_MICRO
|
||||
//#define TFT_DIY
|
||||
//#define TFT_SHIELD
|
||||
//#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 22
|
||||
|
||||
#define SCREEN_ORIENTATION 0
|
||||
|
||||
#define CHAR_WIDTH 12
|
||||
#define SCREEN_WIDTH TFT_WIDTH
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT
|
||||
#define HEIGHT_1 TFT_WIDTH
|
||||
#define WIDTH_1 TFT_HEIGHT
|
||||
#define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
|
||||
#define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
|
||||
#define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
|
||||
#define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
|
||||
#define YMAX 320 // Bottom of screen area
|
||||
#define minimum(a,b) (((a) < (b)) ? (a) : (b))
|
||||
//#define MENU_FONT NULL
|
||||
#define MENU_FONT &FreeMono9pt7b // Winner
|
||||
//#define MENU_FONT &FreeMonoBold9pt7b
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_SCREEN_LIMIT 12
|
||||
#define BUTTON_ARRAY_LEN BUTTON_SCREEN_LIMIT
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
#define LVGL_TICK_PERIOD 6
|
||||
|
||||
#define FRAME_X 100
|
||||
#define FRAME_Y 64
|
||||
#define FRAME_W 120
|
||||
#define FRAME_H 50
|
||||
|
||||
// Red zone size
|
||||
#define REDBUTTON_X FRAME_X
|
||||
#define REDBUTTON_Y FRAME_Y
|
||||
#define REDBUTTON_W (FRAME_W/2)
|
||||
#define REDBUTTON_H FRAME_H
|
||||
|
||||
// Green zone size
|
||||
#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
|
||||
#define GREENBUTTON_Y FRAME_Y
|
||||
#define GREENBUTTON_W (FRAME_W/2)
|
||||
#define GREENBUTTON_H FRAME_H
|
||||
|
||||
#define STATUSBAR_COLOR 0x4A49
|
||||
|
||||
#define KIT_LED_BUILTIN 13
|
||||
#endif
|
||||
|
||||
@@ -1709,6 +1804,25 @@
|
||||
//#define BUTTON_ARRAY_LEN 5
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_V8)
|
||||
#define BANNER_TIME 100
|
||||
|
||||
#define COMMAND_PREFIX "!"
|
||||
|
||||
// Keypad start position, key sizes and spacing
|
||||
#define KEY_X 120 // Centre of key
|
||||
#define KEY_Y 50
|
||||
#define KEY_W 240 // Width and height
|
||||
#define KEY_H 22
|
||||
#define KEY_SPACING_X 0 // X and Y gap
|
||||
#define KEY_SPACING_Y 1
|
||||
#define KEY_TEXTSIZE 1 // Font size multiplier
|
||||
#define ICON_W 22
|
||||
#define ICON_H 22
|
||||
#define BUTTON_PADDING 22
|
||||
//#define BUTTON_ARRAY_LEN 5
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_CYD_MICRO)
|
||||
#define BANNER_TIME 100
|
||||
|
||||
@@ -2002,6 +2116,10 @@
|
||||
#define SD_CS 10
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define SD_CS 10
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//// END SD DEFINITIONS
|
||||
|
||||
@@ -2099,6 +2217,8 @@
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_C5)
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define MEM_LOWER_LIM 10000
|
||||
#endif
|
||||
//// END MEMORY LOWER LIMIT STUFF
|
||||
|
||||
@@ -2119,6 +2239,8 @@
|
||||
#define PIN 22
|
||||
#elif defined(MARAUDER_C5)
|
||||
#define PIN 27
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define PIN 27
|
||||
#else
|
||||
#define PIN 25
|
||||
#endif
|
||||
@@ -2212,6 +2334,10 @@
|
||||
#define GPS_SERIAL_INDEX 1
|
||||
#define GPS_TX 14
|
||||
#define GPS_RX 13
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define GPS_SERIAL_INDEX 1
|
||||
#define GPS_TX 14
|
||||
#define GPS_RX 13
|
||||
#endif
|
||||
#else
|
||||
#define mac_history_len 100
|
||||
@@ -2276,6 +2402,11 @@
|
||||
#define I2C_SCL 25
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define I2C_SCL 4
|
||||
#define I2C_SDA 5
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//// MARAUDER TITLE STUFF
|
||||
@@ -2303,6 +2434,8 @@
|
||||
#define MARAUDER_TITLE_BYTES 13578
|
||||
#elif defined(MARAUDER_C5)
|
||||
#define MARAUDER_TITLE_BYTES 13578
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define MARAUDER_TITLE_BYTES 13578
|
||||
#else
|
||||
#define MARAUDER_TITLE_BYTES 13578
|
||||
#endif
|
||||
@@ -2360,6 +2493,12 @@
|
||||
#define SD_MOSI 7
|
||||
#define SD_SCK 6
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define SD_MISO TFT_MISO
|
||||
#define SD_MOSI TFT_MOSI
|
||||
#define SD_SCK TFT_SCLK
|
||||
#endif
|
||||
#endif
|
||||
//// END STUPID CYD STUFF
|
||||
|
||||
@@ -2410,6 +2549,6 @@
|
||||
#ifndef HAS_DUAL_BAND
|
||||
#define HOP_DELAY 1000
|
||||
#else
|
||||
#define HOP_DELAY 100
|
||||
#define HOP_DELAY 250
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -236,8 +236,6 @@ void setup()
|
||||
backlightOn(); // Need this
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
//delay(2000);
|
||||
|
||||
// Do some stealth mode stuff
|
||||
#ifdef HAS_BUTTONS
|
||||
if (c_btn.justPressed()) {
|
||||
@@ -248,18 +246,6 @@ void setup()
|
||||
Serial.println("Headless Mode enabled");
|
||||
}
|
||||
#endif
|
||||
|
||||
//display_obj.clearScreen();
|
||||
|
||||
//display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
|
||||
//display_obj.tft.println(text_table0[0]);
|
||||
|
||||
//delay(2000);
|
||||
|
||||
//display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
|
||||
|
||||
//display_obj.tft.println(text_table0[1]);
|
||||
#endif
|
||||
|
||||
settings_obj.begin();
|
||||
|
||||
Reference in New Issue
Block a user