mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-02-02 10:14:24 -08:00
Compare commits
6 Commits
nightly_4f
...
v1.10.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0a823ac6b | ||
|
|
68f2bd1636 | ||
|
|
1e70c04894 | ||
|
|
fc55212c82 | ||
|
|
069ff0a475 | ||
|
|
9148a52a92 |
@@ -26,8 +26,6 @@ void BatteryInterface::RunSetup() {
|
||||
|
||||
#ifdef HAS_BATTERY
|
||||
|
||||
Serial.println("Checking for battery monitors...");
|
||||
|
||||
#ifndef HAS_AXP2101
|
||||
Wire.begin(I2C_SDA, I2C_SCL);
|
||||
|
||||
@@ -35,7 +33,7 @@ void BatteryInterface::RunSetup() {
|
||||
error = Wire.endTransmission();
|
||||
|
||||
if (error == 0) {
|
||||
Serial.println("Detected IP5306");
|
||||
Serial.println(F("Detected IP5306"));
|
||||
this->has_ip5306 = true;
|
||||
this->i2c_supported = true;
|
||||
}
|
||||
@@ -45,7 +43,7 @@ void BatteryInterface::RunSetup() {
|
||||
|
||||
if (error == 0) {
|
||||
if (maxlipo.begin()) {
|
||||
Serial.println("Detected MAX17048");
|
||||
Serial.println(F("Detected MAX17048"));
|
||||
this->has_max17048 = true;
|
||||
this->i2c_supported = true;
|
||||
}
|
||||
@@ -56,7 +54,7 @@ void BatteryInterface::RunSetup() {
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
Serial.println("Detected AXP2101");
|
||||
Serial.println(F("Detected AXP2101"));
|
||||
|
||||
this->i2c_supported = true;
|
||||
this->has_axp2101 = true;
|
||||
|
||||
@@ -128,7 +128,7 @@ void EvilPortal::setupServer() {
|
||||
}
|
||||
|
||||
void EvilPortal::setHtmlFromSerial() {
|
||||
Serial.println("Setting HTML from serial...");
|
||||
Serial.println(F("Setting HTML from serial..."));
|
||||
const char *htmlStr = Serial.readString().c_str();
|
||||
#ifdef HAS_PSRAM
|
||||
index_html = (char*) ps_malloc(MAX_HTML_SIZE);
|
||||
@@ -215,10 +215,10 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
// Could not open config file. return false
|
||||
if (!ap_config_file) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("Could not find /ap.config.txt.");
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
this->sendToDisplay(F("Could not find /ap.config.txt."));
|
||||
this->sendToDisplay(F("Touch to exit..."));
|
||||
#endif
|
||||
Serial.println("Could not find /ap.config.txt. Use stopscan...");
|
||||
Serial.println(F("Could not find /ap.config.txt. Use stopscan..."));
|
||||
return false;
|
||||
}
|
||||
// Config file good. Proceed
|
||||
@@ -226,7 +226,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
// ap name too long. return false
|
||||
if (ap_config_file.size() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("The given AP name is too large.");
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
#endif
|
||||
@@ -242,7 +242,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
}
|
||||
}
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("AP name from config file");
|
||||
this->sendToDisplay(F("AP name from config file"));
|
||||
this->sendToDisplay("AP name: " + ap_config);
|
||||
#endif
|
||||
Serial.println("AP name from config file: " + ap_config);
|
||||
@@ -255,7 +255,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
ap_config = ssids->get(0).essid;
|
||||
if (ap_config.length() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("The given AP name is too large.");
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
#endif
|
||||
@@ -263,7 +263,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
return false;
|
||||
}
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("AP name from SSID list");
|
||||
this->sendToDisplay(F("AP name from SSID list"));
|
||||
this->sendToDisplay("AP name: " + ap_config);
|
||||
#endif
|
||||
Serial.println("AP name from SSID list: " + ap_config);
|
||||
@@ -271,7 +271,7 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
else if (temp_ap_name != "") {
|
||||
if (temp_ap_name.length() > MAX_AP_NAME_SIZE) {
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("The given AP name is too large.");
|
||||
this->sendToDisplay(F("The given AP name is too large."));
|
||||
this->sendToDisplay("The Byte limit is " + (String)MAX_AP_NAME_SIZE);
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
#endif
|
||||
@@ -280,24 +280,24 @@ bool EvilPortal::setAP(LinkedList<ssid>* ssids, LinkedList<AccessPoint>* access_
|
||||
else {
|
||||
ap_config = temp_ap_name;
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("AP name from AP list");
|
||||
this->sendToDisplay(F("AP name from AP list"));
|
||||
this->sendToDisplay("AP name: " + ap_config);
|
||||
#endif
|
||||
Serial.println("AP name from AP list: " + ap_config);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Serial.println("Could not configure Access Point. Use stopscan...");
|
||||
Serial.println(F("Could not configure Access Point. Use stopscan..."));
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("Could not configure Access Point.");
|
||||
this->sendToDisplay("Touch to exit...");
|
||||
this->sendToDisplay(F("Could not configure Access Point."));
|
||||
this->sendToDisplay(F("Touch to exit..."));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ap_config != "") {
|
||||
strncpy(apName, ap_config.c_str(), MAX_AP_NAME_SIZE);
|
||||
this->has_ap = true;
|
||||
Serial.println("ap config set");
|
||||
Serial.println(F("ap config set"));
|
||||
this->ap_index = targ_ap_index;
|
||||
return true;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ void EvilPortal::startAP() {
|
||||
WiFi.softAP(apName);
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("AP started");
|
||||
this->sendToDisplay(F("AP started"));
|
||||
#endif
|
||||
|
||||
Serial.print(F("ap ip address: "));
|
||||
@@ -348,7 +348,7 @@ void EvilPortal::startAP() {
|
||||
server.begin();
|
||||
Serial.println(F("Server started"));
|
||||
#ifdef HAS_SCREEN
|
||||
this->sendToDisplay("Evil Portal READY");
|
||||
this->sendToDisplay(F("Evil Portal READY"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ void GpsInterface::begin() {
|
||||
uint32_t gps_baud = this->initGpsBaudAndForce115200();
|
||||
|
||||
if ((gps_baud != 9600) && (gps_baud != 115200))
|
||||
Serial.println("Could not detect GPS baudrate");
|
||||
Serial.println(F("Could not detect GPS baudrate"));
|
||||
|
||||
delay(1000);
|
||||
|
||||
@@ -45,7 +45,7 @@ void GpsInterface::begin() {
|
||||
}
|
||||
else {
|
||||
this->gps_enabled = false;
|
||||
Serial.println("GPS Not Found");
|
||||
Serial.println(F("GPS Not Found"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3513,7 +3513,6 @@ void MenuFunctions::buildButtons(Menu *menu, int starting_index, String button_n
|
||||
button_name.toCharArray(buf, button_name.length() + 1);
|
||||
|
||||
if (i >= BUTTON_SCREEN_LIMIT) {
|
||||
Serial.println("Error: Trying to access out-of-bounds button index " + (String)i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,11 @@ bool SDInterface::initSD() {
|
||||
#else
|
||||
this->spiExt = new SPIClass(FSPI);
|
||||
#endif
|
||||
Serial.println("Using external SPI configuration...");
|
||||
Serial.println(F("Using external SPI configuration..."));
|
||||
this->spiExt->begin(SPI_SCK, SPI_MISO, SPI_MOSI, SD_CS);
|
||||
if (!SD.begin(SD_CS, *(this->spiExt))) {
|
||||
#elif defined(HAS_C5_SD)
|
||||
Serial.println("Using C5 SD configuration...");
|
||||
Serial.println(F("Using C5 SD configuration..."));
|
||||
if (!SD.begin(SD_CS, *_spi)) {
|
||||
#else
|
||||
if (!SD.begin(SD_CS)) {
|
||||
@@ -82,10 +82,8 @@ bool SDInterface::initSD() {
|
||||
}
|
||||
|
||||
if (!SD.exists("/SCRIPTS")) {
|
||||
Serial.println(F("/SCRIPTS does not exist. Creating..."));
|
||||
|
||||
SD.mkdir("/SCRIPTS");
|
||||
Serial.println(F("/SCRIPTS created"));
|
||||
}
|
||||
|
||||
this->sd_files = new LinkedList<String>();
|
||||
@@ -96,7 +94,6 @@ bool SDInterface::initSD() {
|
||||
}
|
||||
|
||||
#else
|
||||
Serial.println(F("SD support disabled, skipping init"));
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -274,7 +274,6 @@ extern "C" {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Serial.println(F("Please Provide a Company Type"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -705,7 +704,6 @@ extern "C" {
|
||||
mac.toUpperCase();
|
||||
int rssi = advertisedDevice->getRSSI();
|
||||
|
||||
Serial.println(F("[FLOCK PENGUIN BATTERY CANDIDATE]"));
|
||||
Serial.println(rssi);
|
||||
Serial.print(F(" MAC: "));
|
||||
Serial.println(mac);
|
||||
@@ -1389,7 +1387,6 @@ extern "C" {
|
||||
mac.toUpperCase();
|
||||
int rssi = advertisedDevice->getRSSI();
|
||||
|
||||
Serial.println(F("[FLOCK PENGUIN BATTERY CANDIDATE]"));
|
||||
Serial.println(rssi);
|
||||
Serial.print(F(" MAC: "));
|
||||
Serial.println(mac);
|
||||
@@ -3228,7 +3225,6 @@ void WiFiScan::RunLoadATList() {
|
||||
DynamicJsonDocument doc(10048);
|
||||
DeserializationError error = deserializeJson(doc, file);
|
||||
if (error) {
|
||||
Serial.print(F("JSON deserialize error: "));
|
||||
Serial.println(error.c_str());
|
||||
file.close();
|
||||
#ifdef HAS_SCREEN
|
||||
@@ -3238,7 +3234,6 @@ void WiFiScan::RunLoadATList() {
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
|
||||
display_obj.tft.println(F("Could not deserialize JSON"));
|
||||
display_obj.tft.println(error.c_str());
|
||||
#endif
|
||||
return;
|
||||
@@ -3773,22 +3768,22 @@ void WiFiScan::logPoint(String lat, String lon, float alt, String datetime, bool
|
||||
|
||||
void WiFiScan::writeHeader(bool poi) {
|
||||
Serial.println(F("Writing header to GPX file..."));
|
||||
buffer_obj.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
||||
buffer_obj.append("<gpx version=\"1.1\" creator=\"ESP32 GPS Logger\" xmlns=\"http://www.topografix.com/GPX/1/1\">\n");
|
||||
buffer_obj.append(F("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"));
|
||||
buffer_obj.append(F("<gpx version=\"1.1\" creator=\"ESP32 GPS Logger\" xmlns=\"http://www.topografix.com/GPX/1/1\">\n"));
|
||||
if (!poi)
|
||||
buffer_obj.append(" <trk>\n");
|
||||
buffer_obj.append(" <name>ESP32 Track</name>\n");
|
||||
buffer_obj.append(F(" <trk>\n"));
|
||||
buffer_obj.append(F(" <name>ESP32 Track</name>\n"));
|
||||
if (!poi)
|
||||
buffer_obj.append(" <trkseg>\n");
|
||||
buffer_obj.append(F(" <trkseg>\n"));
|
||||
}
|
||||
|
||||
void WiFiScan::writeFooter(bool poi) {
|
||||
Serial.println(F("Writing footer to GPX file...\n"));
|
||||
if (!poi) {
|
||||
buffer_obj.append(" </trkseg>\n");
|
||||
buffer_obj.append(" </trk>\n");
|
||||
buffer_obj.append(F(" </trkseg>\n"));
|
||||
buffer_obj.append(F(" </trk>\n"));
|
||||
}
|
||||
buffer_obj.append("</gpx>\n");
|
||||
buffer_obj.append(F("</gpx>\n"));
|
||||
}
|
||||
|
||||
void WiFiScan::RunSetupGPSTracker(uint8_t scan_mode) {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//#define MARAUDER_V8
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.10.0"
|
||||
#define MARAUDER_VERSION "v1.10.1"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
#define HAS_GPS
|
||||
#define HAS_NIMBLE_2
|
||||
#define HAS_IDF_3
|
||||
#define HAS_C5_SD
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V7_1
|
||||
@@ -2599,6 +2600,12 @@
|
||||
#define SD_MOSI TFT_MOSI
|
||||
#define SD_SCK TFT_SCLK
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_V7
|
||||
#define SD_MISO TFT_MISO
|
||||
#define SD_MOSI TFT_MOSI
|
||||
#define SD_SCK TFT_SCLK
|
||||
#endif
|
||||
#endif
|
||||
//// END STUPID CYD STUFF
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@ void setup()
|
||||
delay(10);
|
||||
|
||||
#ifdef HAS_C5_SD
|
||||
Serial.println("Starting shared SPI for C5 SD configuration...");
|
||||
sharedSPI.begin(SD_SCK, SD_MISO, SD_MOSI);
|
||||
delay(100);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user