mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-06 04:41:35 -08:00
Add disable touch
This commit is contained in:
@@ -200,7 +200,10 @@ PROGMEM static const unsigned char menu_icons[][66] = {
|
||||
0x1F, 0xD0, 0x3F, 0x3F, 0xE0, 0x3F, 0x5F, 0xF0, 0x3F, 0xEF, 0xE8, 0x3F,
|
||||
0xF7, 0xE5, 0x3B, 0xFB, 0xDE, 0x3A, 0x7D, 0xFF, 0x3A, 0xBB, 0x7F, 0x3B,
|
||||
0xD7, 0x9F, 0x3D, 0xEF, 0xFF, 0x3E, 0xFF, 0x0F, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0xFD, 0xBF, 0x0B, 0xD0, 0xE7, 0xE7, 0xEF, 0xF7, 0xCF, 0xF3, // DISABLED TOUCH: 34
|
||||
0xAF, 0xF5, 0x6F, 0xF6, 0x6F, 0xF6, 0xAF, 0xF5, 0xCF, 0xF3, 0x0F, 0xF0,
|
||||
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
#ifndef MARAUDER_MINI
|
||||
|
||||
@@ -548,7 +548,8 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
|
||||
// getTouch causes a 10ms delay which makes beacon spam less effective
|
||||
#ifdef HAS_ILI9341
|
||||
pressed = this->updateTouch(&t_x, &t_y);
|
||||
if (!this->disable_touch)
|
||||
pressed = this->updateTouch(&t_x, &t_y);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -616,66 +617,69 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
|
||||
bool c_btn_press = c_btn.justPressed();
|
||||
|
||||
if ((c_btn_press) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
|
||||
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
// Stop the current scan
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EVIL_PORTAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AP_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_MANUAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(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_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR))
|
||||
#ifndef HAS_ILI9341
|
||||
|
||||
if ((c_btn_press) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
|
||||
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_DATA) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
|
||||
{
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
// Stop the current scan
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_RAW_CAPTURE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EVIL_PORTAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_TARGET_AP_FULL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AP_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_MANUAL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_DEAUTH_TARGETED) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_MIMIC) ||
|
||||
(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_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_LIST_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR))
|
||||
{
|
||||
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();
|
||||
// If we don't do this, the text and button coordinates will be off
|
||||
display_obj.tft.init();
|
||||
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
// Take us back to the menu
|
||||
changeMenu(current_menu);
|
||||
}
|
||||
|
||||
x = -1;
|
||||
y = -1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
x = -1;
|
||||
y = -1;
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -989,7 +993,23 @@ void MenuFunctions::updateStatusBar()
|
||||
}
|
||||
|
||||
// Draw battery info
|
||||
MenuFunctions::battery(false);
|
||||
//MenuFunctions::battery(false);
|
||||
display_obj.tft.fillRect(190, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (this->disable_touch) {
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(190,
|
||||
0,
|
||||
menu_icons[DISABLE_TOUCH],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
TFT_RED);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// Draw SD info
|
||||
@@ -1075,7 +1095,23 @@ void MenuFunctions::drawStatusBar()
|
||||
#endif
|
||||
|
||||
|
||||
MenuFunctions::battery2(true);
|
||||
//MenuFunctions::battery2(true);
|
||||
display_obj.tft.fillRect(190, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (this->disable_touch) {
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(190,
|
||||
0,
|
||||
menu_icons[DISABLE_TOUCH],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
TFT_RED);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Draw SD info
|
||||
if (sd_obj.supported)
|
||||
@@ -1169,6 +1205,8 @@ void MenuFunctions::RunSetup()
|
||||
{
|
||||
extern LinkedList<AccessPoint>* access_points;
|
||||
|
||||
this->disable_touch = false;
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
this->initLVGL();
|
||||
#endif
|
||||
|
||||
@@ -71,6 +71,7 @@ extern Settings settings_obj;
|
||||
#define LANGUAGE 31
|
||||
#define STATUS_GPS 32
|
||||
#define GPS_MENU 33
|
||||
#define DISABLE_TOUCH 34
|
||||
|
||||
PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
|
||||
PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
|
||||
@@ -121,7 +122,6 @@ class MenuFunctions
|
||||
uint32_t initTime = 0;
|
||||
uint8_t menu_start_index = 0;
|
||||
|
||||
|
||||
// Main menu stuff
|
||||
Menu mainMenu;
|
||||
|
||||
@@ -163,7 +163,6 @@ class MenuFunctions
|
||||
|
||||
|
||||
void addNodes(Menu* menu, String name, uint16_t color, Menu* child, int place, std::function<void()> callable, bool selected = false, String command = "");
|
||||
void updateStatusBar();
|
||||
void battery(bool initial = false);
|
||||
void battery2(bool initial = false);
|
||||
void showMenuList(Menu* menu, int layer);
|
||||
@@ -192,11 +191,14 @@ class MenuFunctions
|
||||
uint16_t x = -1, y = -1;
|
||||
boolean pressed = false;
|
||||
|
||||
bool disable_touch;
|
||||
|
||||
String loaded_file = "";
|
||||
|
||||
void initLVGL();
|
||||
void deinitLVGL();
|
||||
void selectEPHTMLGFX();
|
||||
void updateStatusBar();
|
||||
void addSSIDGFX();
|
||||
void addAPGFX();
|
||||
void addStationGFX();
|
||||
|
||||
@@ -387,6 +387,22 @@ void loop()
|
||||
mini = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAS_ILI9341
|
||||
#ifdef HAS_BUTTONS
|
||||
if (c_btn.isHeld()) {
|
||||
if (menu_function_obj.disable_touch)
|
||||
menu_function_obj.disable_touch = false;
|
||||
else
|
||||
menu_function_obj.disable_touch = true;
|
||||
|
||||
menu_function_obj.updateStatusBar();
|
||||
|
||||
while (!c_btn.justReleased())
|
||||
delay(1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Update all of our objects
|
||||
/*#ifdef HAS_SCREEN
|
||||
bool do_draw = display_obj.draw_tft;
|
||||
|
||||
BIN
pictures/icons/disable_touch_16.bmp
Normal file
BIN
pictures/icons/disable_touch_16.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 190 B |
6
pictures/xbm/disable_touch_16.xbm
Normal file
6
pictures/xbm/disable_touch_16.xbm
Normal file
@@ -0,0 +1,6 @@
|
||||
#define ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_width 16
|
||||
#define ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_height 16
|
||||
static char ce2b329463664e43e1607d0384f46ac1NszJo7o8A3Pedgwr_bits[] = {
|
||||
0xFF, 0xFF, 0xFD, 0xBF, 0x0B, 0xD0, 0xE7, 0xE7, 0xEF, 0xF7, 0xCF, 0xF3,
|
||||
0xAF, 0xF5, 0x6F, 0xF6, 0x6F, 0xF6, 0xAF, 0xF5, 0xCF, 0xF3, 0x0F, 0xF0,
|
||||
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF, };
|
||||
Reference in New Issue
Block a user