Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Lilygo t3 display s3 #517

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
WiFiScan.cpp: add lilygo T3 display parts
  • Loading branch information
Angus Ainslie committed Apr 3, 2024
commit 456a0b28066e88cbd54dbb4b3a3c090449f5ed07
28 changes: 16 additions & 12 deletions esp32_marauder/WiFiScan.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "WiFiScan.h"
#include "lang_var.h"
#ifdef LILYGO_T_DISPLAY_S3R8
#include "SD_MMC.h"
#endif

int num_beacon = 0;
int num_deauth = 0;
Expand All @@ -10,13 +13,6 @@ LinkedList<ssid>* ssids;
LinkedList<AccessPoint>* access_points;
LinkedList<Station>* stations;

extern "C" int ieee80211_raw_frame_sanity_check(int32_t arg, int32_t arg2, int32_t arg3){
if (arg == 31337)
return 1;
else
return 0;
}

extern "C" {
uint8_t esp_base_mac_addr[6];
esp_err_t esp_ble_gap_set_rand_addr(const uint8_t *rand_addr);
Expand Down Expand Up @@ -306,10 +302,7 @@ WiFiScan::WiFiScan()
}

void WiFiScan::RunSetup() {
if (ieee80211_raw_frame_sanity_check(31337, 0, 0) == 1)
this->wsl_bypass_enabled = true;
else
this->wsl_bypass_enabled = false;
this->wsl_bypass_enabled = true;

ssids = new LinkedList<ssid>();
access_points = new LinkedList<AccessPoint>();
Expand Down Expand Up @@ -934,7 +927,11 @@ void WiFiScan::startPcap(String file_name) {
buffer_obj.pcapOpen(
file_name,
#if defined(HAS_SD)
#ifdef LILYGO_T_DISPLAY_S3R8
sd_obj.supported ? &SD_MMC :
#else
sd_obj.supported ? &SD :
#endif
#endif
NULL,
save_serial // Set with commandline options
Expand All @@ -945,7 +942,11 @@ void WiFiScan::startLog(String file_name) {
buffer_obj.logOpen(
file_name,
#if defined(HAS_SD)
#ifdef LILYGO_T_DISPLAY_S3R8
sd_obj.supported ? &SD_MMC :
#else
sd_obj.supported ? &SD :
#endif
#endif
NULL,
save_serial // Set with commandline options
Expand Down Expand Up @@ -1062,8 +1063,11 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color)
display_obj.tft.setTouch(calData);
#endif


#ifdef LILYGO_T_DISPLAY_S3R8
lv_obj_t * scr = lv_menu_cont_create(NULL);
#else
lv_obj_t * scr = lv_cont_create(NULL, NULL);
#endif
lv_disp_load_scr(scr);

}
Expand Down