mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 07:40:58 -08:00
Fix macros and specify lib ver
This commit is contained in:
8
.github/workflows/build_push.yml
vendored
8
.github/workflows/build_push.yml
vendored
@@ -48,21 +48,21 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ivanseidel/LinkedList
|
||||
ref: master
|
||||
ref: 1.3.1
|
||||
path: CustomLinkedList
|
||||
|
||||
- name: Install lv_arduino
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lvgl/lv_arduino
|
||||
ref: master
|
||||
ref: 3.0.0
|
||||
path: Customlv_arduino
|
||||
|
||||
- name: Install JPEGDecoder
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Bodmer/JPEGDecoder
|
||||
ref: master
|
||||
ref: 1.8.0
|
||||
path: CustomJPEGDecoder
|
||||
|
||||
- name: Install NimBLE-Arduino
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_NeoPixel
|
||||
ref: master
|
||||
ref: 1.10.7
|
||||
path: CustomAdafruit_NeoPixel
|
||||
|
||||
- name: Install ArduinoJson
|
||||
|
||||
@@ -60,46 +60,56 @@ void EvilPortal::setupServer() {
|
||||
|
||||
bool EvilPortal::setHtml() {
|
||||
Serial.println("Setting HTML...");
|
||||
File html_file = sd_obj.getFile("/index.html");
|
||||
if (!html_file) {
|
||||
Serial.println("Could not open index.html. Exiting...");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
String html = "";
|
||||
while (html_file.available()) {
|
||||
char c = html_file.read();
|
||||
if (isPrintable(c))
|
||||
html.concat(c);
|
||||
#ifndef WRITE_PACKETS_SERIAL
|
||||
File html_file = sd_obj.getFile("/index.html");
|
||||
if (!html_file) {
|
||||
Serial.println("Could not open index.html. Exiting...");
|
||||
return false;
|
||||
}
|
||||
strncpy(this->index_html, html.c_str(), strlen(html.c_str()));
|
||||
this->has_html = true;
|
||||
Serial.println("html set");
|
||||
html_file.close();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
String html = "";
|
||||
while (html_file.available()) {
|
||||
char c = html_file.read();
|
||||
if (isPrintable(c))
|
||||
html.concat(c);
|
||||
}
|
||||
strncpy(this->index_html, html.c_str(), strlen(html.c_str()));
|
||||
this->has_html = true;
|
||||
Serial.println("html set");
|
||||
html_file.close();
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
bool EvilPortal::setAP() {
|
||||
File ap_config_file = sd_obj.getFile("/ap.config.txt");
|
||||
if (!ap_config_file) {
|
||||
Serial.println("Could not open ap.config.txt. Exiting...");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
String ap_config = "";
|
||||
while (ap_config_file.available()) {
|
||||
char c = ap_config_file.read();
|
||||
Serial.print(c);
|
||||
if (isPrintable(c))
|
||||
ap_config.concat(c);
|
||||
#ifndef WRITE_PACKETS_SERIAL
|
||||
File ap_config_file = sd_obj.getFile("/ap.config.txt");
|
||||
if (!ap_config_file) {
|
||||
Serial.println("Could not open ap.config.txt. Exiting...");
|
||||
return false;
|
||||
}
|
||||
strncpy(this->apName, ap_config.c_str(), strlen(ap_config.c_str()));
|
||||
this->has_ap = true;
|
||||
Serial.println("ap config set");
|
||||
ap_config_file.close();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
String ap_config = "";
|
||||
while (ap_config_file.available()) {
|
||||
char c = ap_config_file.read();
|
||||
Serial.print(c);
|
||||
if (isPrintable(c))
|
||||
ap_config.concat(c);
|
||||
}
|
||||
strncpy(this->apName, ap_config.c_str(), strlen(ap_config.c_str()));
|
||||
this->has_ap = true;
|
||||
Serial.println("ap config set");
|
||||
ap_config_file.close();
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void EvilPortal::startAP() {
|
||||
|
||||
@@ -7,11 +7,17 @@
|
||||
|
||||
#include "configs.h"
|
||||
#include "settings.h"
|
||||
#include "SDInterface.h"
|
||||
#ifndef WRITE_PACKETS_SERIAL
|
||||
#include "SDInterface.h"
|
||||
#else
|
||||
#include "Buffer.h"
|
||||
#endif
|
||||
#include "lang_var.h"
|
||||
|
||||
extern Settings settings_obj;
|
||||
extern SDInterface sd_obj;
|
||||
#ifndef WRITE_PACKETS_SERIAL
|
||||
extern SDInterface sd_obj;
|
||||
#endif
|
||||
extern Buffer buffer_obj;
|
||||
|
||||
#define WAITING 0
|
||||
|
||||
@@ -632,7 +632,8 @@ void WiFiScan::RunEvilPortal(uint8_t scan_mode, uint16_t color)
|
||||
//else
|
||||
// esp_wifi_set_promiscuous_rx_cb(&apSnifferCallback);
|
||||
//esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
evil_portal_obj.begin();
|
||||
if (!evil_portal_obj.begin())
|
||||
this->StartScan(WIFI_SCAN_OFF, TFT_MAGENTA);
|
||||
this->wifi_initialized = true;
|
||||
initTime = millis();
|
||||
}
|
||||
|
||||
@@ -101,14 +101,17 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
#define FLIPPER_ZERO_HAT
|
||||
//#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_SD
|
||||
#ifndef WRITE_PACKETS_SERIAL
|
||||
#define HAS_SD
|
||||
#define USE_SD
|
||||
#endif
|
||||
//#define HAS_TEMP_SENSOR
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user