mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-01-26 03:05:00 -08:00
Compare commits
51 Commits
v1.8.7
...
nightly_a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a874375fb0 | ||
|
|
22f4dc66ec | ||
|
|
31baacac3e | ||
|
|
601aee9b8a | ||
|
|
93ac8b3cde | ||
|
|
08d1682ae4 | ||
|
|
1343c91064 | ||
|
|
7f741d75fb | ||
|
|
de2a916ad6 | ||
|
|
5a928a7ae8 | ||
|
|
b5bb65f76b | ||
|
|
09b519d0a2 | ||
|
|
3fc18d642b | ||
|
|
7460b40543 | ||
|
|
0b6dc40fa6 | ||
|
|
6331e43db1 | ||
|
|
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: |
|
||||
|
||||
15
.github/workflows/nightly_build.yml
vendored
15
.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
|
||||
@@ -289,6 +289,7 @@ jobs:
|
||||
|
||||
echo "artifact_name=$OUTPUT_BIN" >> $GITHUB_ENV
|
||||
echo "artifact_path=$BUILD_DIR/$OUTPUT_BIN" >> $GITHUB_ENV
|
||||
echo "wild_card=esp32_marauder_${VERSION}_beta_${DATE}_*.bin" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload ${{ matrix.board.name }} Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -314,6 +315,8 @@ jobs:
|
||||
id: meta
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION=$(grep '#define MARAUDER_VERSION' ./esp32_marauder/configs.h | sed -E 's/.*"v([^"]+)"/v\1/' | tr '.' '_')
|
||||
DATE=$(date +%Y%m%d)
|
||||
SHORT_SHA="$(git rev-parse --short HEAD)"
|
||||
if [[ "${{ github.event_name }}" == "schedule" ]]; then
|
||||
echo "name=${SHORT_SHA}_nightly" >> $GITHUB_OUTPUT
|
||||
@@ -326,6 +329,10 @@ jobs:
|
||||
echo "prerelease=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "wild_card=esp32_marauder_${VERSION}_beta_${DATE}_*.bin" >> $GITHUB_ENV
|
||||
|
||||
echo ${{ env.wild_card }}
|
||||
|
||||
- name: Delete old assets on nightly release (if any)
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
@@ -354,12 +361,12 @@ 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
|
||||
generate_release_notes: false
|
||||
draft: false
|
||||
files: |
|
||||
esp32_marauder_v*.bin
|
||||
${{ env.wild_card }}
|
||||
body: |
|
||||
[justcallmekokollc.com](https://justcallmekokollc.com)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -819,6 +819,15 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
this->drawGraph(wifi_scan_obj._analyzer_values);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->setGraphScale(this->graphScaleCheckSmall(wifi_scan_obj.channel_activity));
|
||||
|
||||
this->drawGraphSmall(wifi_scan_obj.channel_activity);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,11 +913,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 +935,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 +1008,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) ||
|
||||
@@ -1019,13 +1030,14 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ANALYZER) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ANALYZER))
|
||||
{
|
||||
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);
|
||||
@@ -1060,6 +1072,7 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_PACKET_RATE) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_RAW_CAPTURE) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_CHAN_ANALYZER) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_CHAN_ACT) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_SIG_STREN) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_FUNNY_BEACON) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_RICK_ROLL))
|
||||
@@ -1115,6 +1128,18 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
else
|
||||
wifi_scan_obj.changeChannel(1);
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (wifi_scan_obj.activity_page < MAX_CHANNEL / CHAN_PER_PAGE) {
|
||||
wifi_scan_obj.activity_page++;
|
||||
}
|
||||
#else
|
||||
if (wifi_scan_obj.activity_page < DUAL_BAND_CHANNELS / CHAN_PER_PAGE) {
|
||||
wifi_scan_obj.activity_page++;
|
||||
}
|
||||
#endif
|
||||
wifi_scan_obj.drawChannelLine();
|
||||
}
|
||||
}
|
||||
if (menu_button == DOWN_BUTTON) {
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
|
||||
@@ -1159,6 +1184,18 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
else
|
||||
wifi_scan_obj.changeChannel(14);
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (wifi_scan_obj.activity_page > 1) {
|
||||
wifi_scan_obj.activity_page--;
|
||||
}
|
||||
#else
|
||||
if (wifi_scan_obj.activity_page > 0) {
|
||||
wifi_scan_obj.activity_page--;
|
||||
}
|
||||
#endif
|
||||
wifi_scan_obj.drawChannelLine();
|
||||
}
|
||||
}
|
||||
if(menu_button == SELECT_BUTTON) {
|
||||
current_menu->list->get(current_menu->selected).callable();
|
||||
@@ -1259,6 +1296,18 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
else
|
||||
wifi_scan_obj.changeChannel(1);
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (wifi_scan_obj.activity_page < MAX_CHANNEL / CHAN_PER_PAGE) {
|
||||
wifi_scan_obj.activity_page++;
|
||||
}
|
||||
#else
|
||||
if (wifi_scan_obj.activity_page < DUAL_BAND_CHANNELS / CHAN_PER_PAGE) {
|
||||
wifi_scan_obj.activity_page++;
|
||||
}
|
||||
#endif
|
||||
wifi_scan_obj.drawChannelLine();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1311,6 +1360,18 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
else
|
||||
wifi_scan_obj.changeChannel(14);
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (wifi_scan_obj.activity_page > 1) {
|
||||
wifi_scan_obj.activity_page--;
|
||||
}
|
||||
#else
|
||||
if (wifi_scan_obj.activity_page > 0) {
|
||||
wifi_scan_obj.activity_page--;
|
||||
}
|
||||
#endif
|
||||
wifi_scan_obj.drawChannelLine();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1519,6 +1580,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 +1911,7 @@ void MenuFunctions::drawStatusBar()
|
||||
|
||||
void MenuFunctions::orientDisplay()
|
||||
{
|
||||
display_obj.tft.init();
|
||||
display_obj.init();
|
||||
|
||||
display_obj.tft.setRotation(SCREEN_ORIENTATION); // Portrait
|
||||
|
||||
@@ -1856,15 +1919,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 +2022,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 +2091,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 +2155,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);
|
||||
@@ -2262,6 +2319,12 @@ void MenuFunctions::RunSetup()
|
||||
this->renderGraphUI(WIFI_SCAN_CHAN_ANALYZER);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_CHAN_ANALYZER, TFT_CYAN);
|
||||
});
|
||||
this->addNodes(&wifiSnifferMenu, "Channel Summary", TFTORANGE, NULL, PACKET_MONITOR, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
this->renderGraphUI(WIFI_SCAN_CHAN_ACT);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_CHAN_ACT, TFT_CYAN);
|
||||
});
|
||||
|
||||
this->addNodes(&wifiSnifferMenu, text_table1[58], TFTWHITE, NULL, PACKET_MONITOR, [this]() {
|
||||
display_obj.clearScreen();
|
||||
@@ -2723,6 +2786,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 +3135,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 +3269,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 +3332,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 +3516,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 +3956,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));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4109,6 +4049,18 @@ void MenuFunctions::setGraphScale(float scale) {
|
||||
this->_graph_scale = scale;
|
||||
}
|
||||
|
||||
float MenuFunctions::calculateGraphScale(uint8_t value) {
|
||||
if ((value * this->_graph_scale < GRAPH_VERT_LIM) && (value * this->_graph_scale > GRAPH_VERT_LIM * 0.75)) {
|
||||
return this->_graph_scale; // No scaling needed if the value is within the limit
|
||||
}
|
||||
|
||||
if (value < GRAPH_VERT_LIM)
|
||||
return 1.0;
|
||||
|
||||
// Calculate the multiplier proportionally
|
||||
return (0.75 * GRAPH_VERT_LIM) / value;
|
||||
}
|
||||
|
||||
float MenuFunctions::calculateGraphScale(int16_t value) {
|
||||
if ((value * this->_graph_scale < GRAPH_VERT_LIM) && (value * this->_graph_scale > GRAPH_VERT_LIM * 0.75)) {
|
||||
return this->_graph_scale; // No scaling needed if the value is within the limit
|
||||
@@ -4140,6 +4092,25 @@ float MenuFunctions::graphScaleCheck(const int16_t array[TFT_WIDTH]) {
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
float MenuFunctions::graphScaleCheckSmall(const uint8_t array[CHAN_PER_PAGE]) {
|
||||
uint8_t maxValue = 0;
|
||||
|
||||
// Iterate through the array to find the highest value
|
||||
for (uint8_t i = 0; i < CHAN_PER_PAGE; i++) {
|
||||
if (array[i] > maxValue) {
|
||||
maxValue = array[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If the highest value exceeds GRAPH_VERT_LIM, call calculateMultiplier
|
||||
if (maxValue > GRAPH_VERT_LIM) {
|
||||
return this->calculateGraphScale(maxValue);
|
||||
}
|
||||
|
||||
// If the highest value does not exceed GRAPH_VERT_LIM, return 1.0
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
void MenuFunctions::drawMaxLine(int16_t value, uint16_t color) {
|
||||
display_obj.tft.drawLine(0, TFT_HEIGHT - (value * this->_graph_scale), TFT_WIDTH, TFT_HEIGHT - (value * this->_graph_scale), color);
|
||||
display_obj.tft.setCursor(0, TFT_HEIGHT - (value * this->_graph_scale));
|
||||
@@ -4148,6 +4119,60 @@ void MenuFunctions::drawMaxLine(int16_t value, uint16_t color) {
|
||||
display_obj.tft.println((String)(value / BASE_MULTIPLIER));
|
||||
}
|
||||
|
||||
void MenuFunctions::drawMaxLine(uint8_t value, uint16_t color) {
|
||||
//display_obj.tft.drawLine(0, TFT_HEIGHT - (value * this->_graph_scale), TFT_WIDTH, TFT_HEIGHT - (value * this->_graph_scale), color);
|
||||
display_obj.tft.setCursor(0, TFT_HEIGHT - (value * this->_graph_scale));
|
||||
display_obj.tft.setTextColor(color, TFT_BLACK);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.println((String)value);
|
||||
}
|
||||
|
||||
void MenuFunctions::drawGraphSmall(uint8_t *values) {
|
||||
uint8_t maxValue = 0;
|
||||
//(i + (CHAN_PER_PAGE * (this->activity_page - 1)))
|
||||
|
||||
int bar_width = TFT_WIDTH / (CHAN_PER_PAGE * 2);
|
||||
//display_obj.tft.fillRect(0, TFT_HEIGHT / 2 + 1, TFT_WIDTH, (TFT_HEIGHT / 2) + 1, TFT_BLACK);
|
||||
|
||||
#ifndef HAS_DUAL_BAND
|
||||
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
|
||||
int targ_val = i + (CHAN_PER_PAGE * (wifi_scan_obj.activity_page - 1)) - 1;
|
||||
int x_mult = (i * 2) - 1;
|
||||
int x_coord = (TFT_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
|
||||
|
||||
if (values[targ_val] > maxValue) {
|
||||
maxValue = values[targ_val];
|
||||
}
|
||||
|
||||
if (values[targ_val] * this->_graph_scale <= GRAPH_VERT_LIM) {
|
||||
display_obj.tft.fillRect(x_coord, TFT_HEIGHT / 2 + 1, bar_width, TFT_HEIGHT / 2 + 1, TFT_BLACK);
|
||||
display_obj.tft.fillRect(x_coord, TFT_HEIGHT - (values[targ_val] * this->_graph_scale), bar_width, values[targ_val] * this->_graph_scale, TFT_CYAN);
|
||||
}
|
||||
|
||||
display_obj.tft.drawLine(x_coord - 2, TFT_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2), x_coord - 2, TFT_HEIGHT, TFT_WHITE);
|
||||
}
|
||||
#else
|
||||
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
|
||||
int targ_val = i + (CHAN_PER_PAGE * (wifi_scan_obj.activity_page - 1)) - 1;
|
||||
int x_mult = (i * 2) - 1;
|
||||
int x_coord = (TFT_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
|
||||
|
||||
if (values[targ_val] > maxValue) {
|
||||
maxValue = values[targ_val];
|
||||
}
|
||||
|
||||
if (values[targ_val] * this->_graph_scale <= GRAPH_VERT_LIM) {
|
||||
display_obj.tft.fillRect(x_coord, TFT_HEIGHT / 2 + 1, bar_width, TFT_HEIGHT / 2 + 1, TFT_BLACK);
|
||||
display_obj.tft.fillRect(x_coord, TFT_HEIGHT - (values[targ_val] * this->_graph_scale), bar_width, values[targ_val] * this->_graph_scale, TFT_CYAN);
|
||||
}
|
||||
|
||||
display_obj.tft.drawLine(x_coord - 2, TFT_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2), x_coord - 2, TFT_HEIGHT, TFT_WHITE);
|
||||
}
|
||||
#endif
|
||||
|
||||
this->drawMaxLine(maxValue, TFT_GREEN); // Draw max
|
||||
}
|
||||
|
||||
void MenuFunctions::drawGraph(int16_t *values) {
|
||||
int16_t maxValue = 0;
|
||||
int total = 0;
|
||||
@@ -4172,7 +4197,7 @@ void MenuFunctions::drawGraph(int16_t *values) {
|
||||
}
|
||||
|
||||
this->drawMaxLine(maxValue, TFT_GREEN); // Draw max
|
||||
this->drawMaxLine(total / TFT_WIDTH, TFT_ORANGE); // Draw average
|
||||
this->drawMaxLine((int16_t)(total / TFT_WIDTH), TFT_ORANGE); // Draw average
|
||||
}
|
||||
|
||||
void MenuFunctions::renderGraphUI(uint8_t scan_mode) {
|
||||
@@ -4220,7 +4245,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 +4254,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 +4393,4 @@ void MenuFunctions::displayCurrentMenu(int start_index)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -223,15 +223,23 @@ 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);
|
||||
void drawMaxLine(int16_t value, uint16_t color);
|
||||
void drawMaxLine(uint8_t value, uint16_t color);
|
||||
float calculateGraphScale(int16_t value);
|
||||
float calculateGraphScale(uint8_t value);
|
||||
float graphScaleCheck(const int16_t array[TFT_WIDTH]);
|
||||
#ifndef HAS_DUAL_BAND
|
||||
float graphScaleCheckSmall(const uint8_t array[MAX_CHANNEL]);
|
||||
#else
|
||||
float graphScaleCheckSmall(const uint8_t array[DUAL_BAND_CHANNELS]);
|
||||
#endif
|
||||
void drawGraph(int16_t *values);
|
||||
void drawGraphSmall(uint8_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 = "");
|
||||
|
||||
@@ -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) {
|
||||
@@ -1028,7 +1040,8 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
#endif
|
||||
}
|
||||
else if ((scan_mode == WIFI_SCAN_CHAN_ANALYZER) ||
|
||||
(scan_mode == WIFI_SCAN_PACKET_RATE)) {
|
||||
(scan_mode == WIFI_SCAN_PACKET_RATE) ||
|
||||
(scan_mode == WIFI_SCAN_CHAN_ACT)) {
|
||||
//#ifdef HAS_SCREEN
|
||||
RunPacketMonitor(scan_mode, color);
|
||||
//#endif
|
||||
@@ -1059,7 +1072,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
|
||||
@@ -1332,6 +1349,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
(currentScanMode == WIFI_ATTACK_FUNNY_BEACON) ||
|
||||
(currentScanMode == WIFI_PACKET_MONITOR) ||
|
||||
(currentScanMode == WIFI_SCAN_CHAN_ANALYZER) ||
|
||||
(currentScanMode == WIFI_SCAN_CHAN_ACT) ||
|
||||
(currentScanMode == WIFI_SCAN_PACKET_RATE) ||
|
||||
(currentScanMode == WIFI_CONNECTED) ||
|
||||
(currentScanMode == LV_JOIN_WIFI) ||
|
||||
@@ -1375,6 +1393,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 +2228,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
|
||||
@@ -2820,26 +2827,17 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
if ((scan_mode != WIFI_SCAN_PACKET_RATE) &&
|
||||
(scan_mode != WIFI_SCAN_CHAN_ANALYZER)) {
|
||||
(scan_mode != WIFI_SCAN_CHAN_ANALYZER) &&
|
||||
(scan_mode != WIFI_SCAN_CHAN_ACT)) {
|
||||
#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
|
||||
@@ -2876,6 +2874,11 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.drawCentreString("Channel Analyzer", TFT_WIDTH / 2, 16, 2);
|
||||
}
|
||||
else if (scan_mode == WIFI_SCAN_CHAN_ACT) {
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.drawCentreString("Channel Summary", TFT_WIDTH / 2, 16, 2);
|
||||
this->drawChannelLine();
|
||||
}
|
||||
else if (scan_mode == WIFI_SCAN_PACKET_RATE) {
|
||||
display_obj.tft.drawCentreString("Packet Rate", TFT_WIDTH / 2, 16, 2);
|
||||
}
|
||||
@@ -2904,8 +2907,16 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.tft.drawCentreString(text_table1[45],TFT_WIDTH / 2,16,2);
|
||||
else if (scan_mode == WIFI_SCAN_CHAN_ANALYZER)
|
||||
display_obj.tft.drawCentreString("Channel Analyzer", TFT_WIDTH / 2, 16, 2);
|
||||
else if (scan_mode == WIFI_SCAN_CHAN_ACT) {
|
||||
display_obj.tft.drawCentreString("Channel Summary", TFT_WIDTH / 2, 16, 2);
|
||||
this->drawChannelLine();
|
||||
}
|
||||
else if (scan_mode == WIFI_SCAN_PACKET_RATE)
|
||||
display_obj.tft.drawCentreString("Packet Rate", TFT_WIDTH / 2, 16, 2);
|
||||
#else
|
||||
if (scan_mode == WIFI_SCAN_CHAN_ACT) {
|
||||
this->drawChannelLine();
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_ILI9341
|
||||
display_obj.touchToExit();
|
||||
@@ -2949,7 +2960,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 +2969,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 +2982,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 +3856,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 +3873,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 +3886,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);
|
||||
}
|
||||
@@ -7132,7 +7139,8 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
#endif
|
||||
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_SCAN_CHAN_ANALYZER) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_PACKET_RATE)) {
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_PACKET_RATE) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_CHAN_ACT)) {
|
||||
|
||||
if (type == WIFI_PKT_MGMT)
|
||||
{
|
||||
@@ -7244,6 +7252,13 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_CHAN_ACT) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
wifi_scan_obj.channel_activity[wifi_scan_obj.set_channel - 1] = wifi_scan_obj.channel_activity[wifi_scan_obj.set_channel - 1] + 1;
|
||||
#else
|
||||
wifi_scan_obj.channel_activity[wifi_scan_obj.dual_band_channel_index] = wifi_scan_obj.channel_activity[wifi_scan_obj.dual_band_channel_index] + 1;
|
||||
#endif
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_PACKET_RATE) {
|
||||
bool found = false;
|
||||
// Get the source addr
|
||||
@@ -7381,6 +7396,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 +7536,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 +7588,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 +7621,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 +7636,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 +7678,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 +7905,93 @@ void WiFiScan::changeChannel()
|
||||
}
|
||||
|
||||
// Function to cycle to the next channel
|
||||
void WiFiScan::channelHop()
|
||||
void WiFiScan::channelHop(bool filtered, bool ranged)
|
||||
{
|
||||
#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;
|
||||
|
||||
int top_chan = 0;
|
||||
int bot_chan = 0;
|
||||
|
||||
if (!filtered) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (ranged) {
|
||||
top_chan = activity_page * CHAN_PER_PAGE;
|
||||
bot_chan = (activity_page * CHAN_PER_PAGE) - CHAN_PER_PAGE + 1;
|
||||
}
|
||||
else {
|
||||
top_chan = MAX_CHANNEL;
|
||||
bot_chan = 1;
|
||||
}
|
||||
|
||||
this->set_channel = this->set_channel + 1;
|
||||
if (this->set_channel > top_chan) {
|
||||
this->set_channel = bot_chan;
|
||||
}
|
||||
#else
|
||||
if (ranged) {
|
||||
top_chan = activity_page * CHAN_PER_PAGE - 1;
|
||||
bot_chan = (activity_page * CHAN_PER_PAGE) - CHAN_PER_PAGE;
|
||||
}
|
||||
else {
|
||||
top_chan = DUAL_BAND_CHANNELS;
|
||||
bot_chan = 0;
|
||||
}
|
||||
|
||||
if (this->dual_band_channel_index >= top_chan)
|
||||
this->dual_band_channel_index = bot_chan;
|
||||
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 +8024,160 @@ 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
|
||||
}
|
||||
|
||||
void WiFiScan::drawChannelLine() {
|
||||
#ifdef HAS_SCREEN
|
||||
//#ifdef HAS_FULL_SCREEN
|
||||
display_obj.tft.fillRect(0, TFT_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2), TFT_WIDTH, (CHAR_WIDTH * 2) - 1, TFT_BLACK);
|
||||
//#else
|
||||
//#endif
|
||||
Serial.println("Drawing channel line...");
|
||||
#ifndef HAS_DUAL_BAND
|
||||
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
|
||||
int x_mult = (i * 2) - 1;
|
||||
int x_coord = (TFT_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
|
||||
#ifdef HAS_FULL_SCREEN
|
||||
display_obj.tft.setTextSize(2);
|
||||
#else
|
||||
display_obj.tft.setTextSize(1);
|
||||
#endif
|
||||
display_obj.tft.setCursor(x_coord, TFT_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2));
|
||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
display_obj.tft.print((String)(i + (CHAN_PER_PAGE * (this->activity_page - 1))));
|
||||
}
|
||||
#else
|
||||
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
|
||||
int x_mult = (i * 2) - 1;
|
||||
int x_coord = (TFT_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
|
||||
//#ifdef HAS_FULL_SCREEN
|
||||
// display_obj.tft.setTextSize(2);
|
||||
//#else
|
||||
display_obj.tft.setTextSize(1);
|
||||
//#endif
|
||||
display_obj.tft.setCursor(x_coord, TFT_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2));
|
||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
display_obj.tft.print((String)this->dual_band_channels[(i + (CHAN_PER_PAGE * (this->activity_page - 1)) - 1)]);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void WiFiScan::channelActivityLoop(uint32_t tick) {
|
||||
#ifdef HAS_SCREEN
|
||||
/*if (tick - this->initTime >= BANNER_TIME) {
|
||||
this->initTime = millis();
|
||||
this->addAnalyzerValue(this->_analyzer_value * BASE_MULTIPLIER, -72, this->_analyzer_values, TFT_WIDTH);
|
||||
this->_analyzer_value = 0;
|
||||
if (this->analyzer_name_update) {
|
||||
this->displayAnalyzerString(this->analyzer_name_string);
|
||||
this->analyzer_name_update = false;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (tick - this->initTime >= BANNER_TIME * 50) {
|
||||
initTime = millis();
|
||||
Serial.println("--------------");
|
||||
for (int i = (activity_page * CHAN_PER_PAGE) - CHAN_PER_PAGE; i < activity_page * CHAN_PER_PAGE; i++) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
Serial.println((String)(i+1) + ": " + (String)channel_activity[i]);
|
||||
#else
|
||||
Serial.println((String)this->dual_band_channels[i] + ": " + (String)channel_activity[i]);
|
||||
#endif
|
||||
channel_activity[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
int8_t b = this->checkAnalyzerButtons(millis());
|
||||
|
||||
if (b == 6) {
|
||||
this->StartScan(WIFI_SCAN_OFF);
|
||||
this->orient_display = true;
|
||||
return;
|
||||
}
|
||||
else if (b == 4) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (this->activity_page > 1) {
|
||||
this->activity_page--;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
this->drawChannelLine();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->activity_page > 1) {
|
||||
this->activity_page--;
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
this->drawChannelLine();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Channel + button pressed
|
||||
else if (b == 5) {
|
||||
#ifndef HAS_DUAL_BAND
|
||||
if (this->activity_page < MAX_CHANNEL / CHAN_PER_PAGE) {
|
||||
this->activity_page++;
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
this->drawChannelLine();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (this->activity_page < DUAL_BAND_CHANNELS / CHAN_PER_PAGE) {
|
||||
this->activity_page++;
|
||||
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
|
||||
display_obj.tftDrawExitScaleButtons(false);
|
||||
this->drawChannelLine();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -7968,24 +8204,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 +8758,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 +8809,14 @@ 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_CHAN_ACT) {
|
||||
this->channelActivityLoop(currentTime);
|
||||
|
||||
if (currentTime - chanActTime >= 100) {
|
||||
chanActTime = millis();
|
||||
this->channelHop(false, true);
|
||||
}
|
||||
}
|
||||
else if ((currentScanMode == WIFI_SCAN_PACKET_RATE) ||
|
||||
(currentScanMode == WIFI_SCAN_RAW_CAPTURE)) {
|
||||
@@ -8657,10 +8938,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,8 @@
|
||||
#define WIFI_SCAN_SMTP 67
|
||||
#define WIFI_SCAN_RDP 68
|
||||
#define WIFI_HOSTSPOT 69 // Nice
|
||||
#define BT_SCAN_AIRTAG_MON 70
|
||||
#define WIFI_SCAN_CHAN_ACT 71
|
||||
|
||||
#define WIFI_ATTACK_FUNNY_BEACON 99
|
||||
|
||||
@@ -216,6 +218,8 @@ struct AirTag {
|
||||
std::vector<uint8_t> payload; // Payload data
|
||||
uint16_t payloadSize;
|
||||
bool selected;
|
||||
int8_t rssi;
|
||||
uint32_t last_seen;
|
||||
};
|
||||
|
||||
struct Flipper {
|
||||
@@ -236,6 +240,8 @@ class WiFiScan
|
||||
struct mac_addr mac_history[mac_history_len];
|
||||
#endif
|
||||
|
||||
uint32_t chanActTime = 0;
|
||||
|
||||
uint8_t ap_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
|
||||
uint8_t sta_mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
|
||||
|
||||
@@ -542,6 +548,7 @@ class WiFiScan
|
||||
|
||||
void signalAnalyzerLoop(uint32_t tick);
|
||||
void channelAnalyzerLoop(uint32_t tick);
|
||||
void channelActivityLoop(uint32_t tick);
|
||||
void packetRateLoop(uint32_t tick);
|
||||
void packetMonitorMain(uint32_t currentTime);
|
||||
void eapolMonitorMain(uint32_t currentTime);
|
||||
@@ -614,6 +621,14 @@ class WiFiScan
|
||||
bool save_pcap = false;
|
||||
bool ep_deauth = false;
|
||||
|
||||
#ifdef HAS_DUAL_BAND
|
||||
uint8_t channel_activity[DUAL_BAND_CHANNELS] = {};
|
||||
#else
|
||||
uint8_t channel_activity[MAX_CHANNEL] = {};
|
||||
#endif
|
||||
|
||||
uint8_t activity_page = 1;
|
||||
|
||||
String analyzer_name_string = "";
|
||||
|
||||
uint8_t analyzer_frames_recvd = 0;
|
||||
@@ -696,9 +711,11 @@ class WiFiScan
|
||||
|
||||
wifi_config_t ap_config;
|
||||
|
||||
void drawChannelLine();
|
||||
#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 +761,7 @@ class WiFiScan
|
||||
void RunSaveATList(bool save_as = true);
|
||||
void RunLoadATList();
|
||||
void RunSetupGPSTracker(uint8_t scan_mode);
|
||||
void channelHop();
|
||||
void channelHop(bool filtered = false, bool ranged = 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.10"
|
||||
|
||||
#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
|
||||
@@ -223,7 +226,7 @@
|
||||
#define HAS_TOUCH
|
||||
#define HAS_FLIPPER_LED
|
||||
//#define FLIPPER_ZERO_HAT
|
||||
#define HAS_BATTERY
|
||||
//#define HAS_BATTERY
|
||||
#define HAS_BT
|
||||
#define HAS_BT_REMOTE
|
||||
#define HAS_BUTTONS
|
||||
@@ -242,7 +245,7 @@
|
||||
#define HAS_TOUCH
|
||||
#define HAS_FLIPPER_LED
|
||||
//#define FLIPPER_ZERO_HAT
|
||||
#define HAS_BATTERY
|
||||
//#define HAS_BATTERY
|
||||
#define HAS_BT
|
||||
#define HAS_BT_REMOTE
|
||||
#define HAS_BUTTONS
|
||||
@@ -262,7 +265,7 @@
|
||||
#define HAS_TOUCH
|
||||
#define HAS_FLIPPER_LED
|
||||
//#define FLIPPER_ZERO_HAT
|
||||
#define HAS_BATTERY
|
||||
//#define HAS_BATTERY
|
||||
#define HAS_BT
|
||||
#define HAS_BT_REMOTE
|
||||
#define HAS_BUTTONS
|
||||
@@ -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
|
||||
@@ -688,6 +711,8 @@
|
||||
#ifdef HAS_SCREEN
|
||||
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
//#define TFT_MISO 19
|
||||
#define TFT_MOSI 15
|
||||
@@ -713,7 +738,7 @@
|
||||
#define TFT_HEIGHT 240
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
@@ -762,6 +787,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_M5STICKCP2)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#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
|
||||
@@ -787,7 +814,7 @@
|
||||
#define TFT_HEIGHT 240
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
@@ -836,6 +863,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_CARDPUTER
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
//#define TFT_MISO -1
|
||||
#define TFT_MOSI 35
|
||||
@@ -860,7 +889,7 @@
|
||||
#define TFT_HEIGHT 240
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
@@ -909,6 +938,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V4
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
#define BANNER_TEXT_SIZE 2
|
||||
@@ -923,7 +954,7 @@
|
||||
|
||||
#define TFT_SHIELD
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -973,6 +1004,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_V6) || defined(MARAUDER_V6_1)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
|
||||
@@ -987,10 +1020,84 @@
|
||||
#endif
|
||||
|
||||
#ifndef MARAUDER_CYD_MICRO
|
||||
#define TFT_DIY
|
||||
#define TFT_DIY
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#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
|
||||
|
||||
#if defined(MARAUDER_V8)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#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 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -1044,6 +1151,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_CYD_MICRO)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
|
||||
@@ -1057,7 +1166,7 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -1111,6 +1220,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_CYD_2USB)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
#define HAS_ST7789
|
||||
@@ -1125,7 +1236,7 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -1179,6 +1290,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_CYD_3_5_INCH)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
#define HAS_ST7796
|
||||
@@ -1195,7 +1308,7 @@
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -1249,6 +1362,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(MARAUDER_CYD_GUITION)
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
|
||||
@@ -1264,7 +1379,7 @@
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 20
|
||||
|
||||
@@ -1318,6 +1433,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V7
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
//#define HAS_ILI9341
|
||||
|
||||
@@ -1331,7 +1448,7 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
@@ -1387,6 +1504,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V7_1
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
//#define HAS_ILI9341
|
||||
|
||||
@@ -1400,7 +1519,7 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define TFT_DIY
|
||||
|
||||
@@ -1456,6 +1575,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_KIT
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define HAS_ILI9341
|
||||
|
||||
@@ -1469,7 +1590,7 @@
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define TFT_DIY
|
||||
#define KIT
|
||||
@@ -1522,6 +1643,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
@@ -1547,7 +1670,7 @@
|
||||
#define TFT_HEIGHT 128
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
@@ -1595,6 +1718,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_REV_FEATHER
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#define SCREEN_CHAR_WIDTH 40
|
||||
//#define TFT_MISO 37
|
||||
//#define TFT_MOSI 35
|
||||
@@ -1620,7 +1745,7 @@
|
||||
#define TFT_HEIGHT 135
|
||||
#endif
|
||||
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2
|
||||
#define GRAPH_VERT_LIM TFT_HEIGHT/2 - 1
|
||||
|
||||
#define EXT_BUTTON_WIDTH 0
|
||||
|
||||
@@ -1709,6 +1834,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 +2146,10 @@
|
||||
#define SD_CS 10
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define SD_CS 10
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//// END SD DEFINITIONS
|
||||
|
||||
@@ -2048,6 +2196,8 @@
|
||||
#define STANDARD_FONT_CHAR_LIMIT 40
|
||||
#define FLASH_BUTTON -1
|
||||
|
||||
#define CHAN_PER_PAGE 7
|
||||
|
||||
#include <FS.h>
|
||||
#include <functional>
|
||||
#include <LinkedList.h>
|
||||
@@ -2099,6 +2249,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 +2271,8 @@
|
||||
#define PIN 22
|
||||
#elif defined(MARAUDER_C5)
|
||||
#define PIN 27
|
||||
#elif defined(MARAUDER_V8)
|
||||
#define PIN 27
|
||||
#else
|
||||
#define PIN 25
|
||||
#endif
|
||||
@@ -2150,16 +2304,16 @@
|
||||
#define GPS_RX 13
|
||||
#elif defined(MARAUDER_CYD_MICRO)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 1 // Community pinout matching old forks and even bruce firmware allowing for hardware standardization
|
||||
#define GPS_RX 3
|
||||
#define GPS_TX 22 // Whoever thought it would be a good idea to use UART0 for GPS...
|
||||
#define GPS_RX 27 // Now maybe we will be able to use CLI
|
||||
#elif defined(MARAUDER_CYD_2USB)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 1 // Community pinout matching old forks and even bruce firmware allowing for hardware standardization
|
||||
#define GPS_RX 3
|
||||
#define GPS_TX 22 // Whoever thought it would be a good idea to use UART0 for GPS...
|
||||
#define GPS_RX 27 // Now maybe we will be able to use CLI
|
||||
#elif defined(MARAUDER_CYD_3_5_INCH)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 21
|
||||
#define GPS_RX 22
|
||||
#define GPS_RX 25
|
||||
#elif defined(MARAUDER_CYD_GUITION)
|
||||
#define GPS_SERIAL_INDEX 2
|
||||
#define GPS_TX 21 // Fits the extended I/O
|
||||
@@ -2212,6 +2366,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 +2434,16 @@
|
||||
#define I2C_SCL 25
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_CYD_GUITION
|
||||
#define I2C_SDA 22
|
||||
#define I2C_SCL 21
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V8
|
||||
#define I2C_SCL 4
|
||||
#define I2C_SDA 5
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//// MARAUDER TITLE STUFF
|
||||
@@ -2303,6 +2471,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 +2530,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 +2586,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