little test not for now

This commit is contained in:
richonguzman
2023-08-29 18:09:51 -04:00
parent c8fcfce615
commit 660efcd10f
3 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -24,5 +24,4 @@ lib_deps =
esphome/AsyncTCP-esphome@^2.0.0
mikalhart/TinyGPSPlus @ 1.0.3
adafruit/Adafruit Unified Sensor@^1.1.9
adafruit/Adafruit BME280 Library@^2.2.2
LittleFS
adafruit/Adafruit BME280 Library@^2.2.2
+4 -4
View File
@@ -1,15 +1,15 @@
#include <ArduinoJson.h>
#include <LittleFS.h>
#include <SPIFFS.h>
#include "configuration.h"
#include "display.h"
Configuration::Configuration() {
_filePath = "/igate_conf.json";
if (!LittleFS.begin(false)) {
Serial.println("LittleFS Mount Failed");
if (!SPIFFS.begin(false)) {
Serial.println("SPIFFS Mount Failed");
return;
}
readFile(LittleFS, _filePath.c_str());
readFile(SPIFFS, _filePath.c_str());
}
void Configuration::readFile(fs::FS &fs, const char *fileName) {
+4 -4
View File
@@ -1,7 +1,7 @@
#include <ESPAsyncWebServer.h>
#include <AsyncElegantOTA.h>
#include <AsyncTCP.h>
#include <LittleFS.h>
#include <SPIFFS.h>
#include <WiFi.h>
#include "configuration.h"
#include "station_utils.h"
@@ -269,15 +269,15 @@ void startServer() {
});
server.on("/test1", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(LittleFS, "/index.html", "text/html");
request->send(SPIFFS, "/index.html", "text/html");
});
server.on("/test2", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(LittleFS, "/index2.html", "text/html");
request->send(SPIFFS, "/index2.html", "text/html");
});
server.on("/testx", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(LittleFS, "/testx.html", "text/html");//"application/json");
request->send(SPIFFS, "/testx.html", "text/html");//"application/json");
});
if (Config.ota.username != "" && Config.ota.password != "") {