mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-15 01:43:56 +01:00
changing from SPIFFS to LittleFS
This commit is contained in:
parent
9e10a7fad1
commit
1b28beb3f4
|
|
@ -13,6 +13,7 @@ platform = espressif32 @ 6.3.1
|
|||
board = ttgo-lora32-v21
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
board_build.filesystem = littlefs
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@^6.20.2
|
||||
sandeepmistry/LoRa@^0.8.0
|
||||
|
|
@ -23,4 +24,5 @@ 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
|
||||
adafruit/Adafruit BME280 Library@^2.2.2
|
||||
LittleFS
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
#include <ArduinoJson.h>
|
||||
#include <SPIFFS.h>
|
||||
#include <LittleFS.h>
|
||||
#include "configuration.h"
|
||||
#include "display.h"
|
||||
|
||||
Configuration::Configuration() {
|
||||
_filePath = "/igate_conf.json";
|
||||
if (!SPIFFS.begin(false)) {
|
||||
Serial.println("SPIFFS Mount Failed");
|
||||
if (!LittleFS.begin(false)) {
|
||||
Serial.println("LittleFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
readFile(SPIFFS, _filePath.c_str());
|
||||
readFile(LittleFS, _filePath.c_str());
|
||||
}
|
||||
|
||||
void Configuration::readFile(fs::FS &fs, const char *fileName) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <ESPAsyncWebServer.h>
|
||||
#include <AsyncElegantOTA.h>
|
||||
#include <AsyncTCP.h>
|
||||
#include <SPIFFS.h>
|
||||
#include <LittleFS.h>
|
||||
#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
#include "station_utils.h"
|
||||
|
|
@ -269,11 +269,11 @@ void startOTAServer() {
|
|||
});
|
||||
|
||||
server.on("/test1", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(SPIFFS, "/index.html", "text/html");
|
||||
request->send(LittleFS, "/index.html", "text/html");
|
||||
});
|
||||
|
||||
server.on("/test2", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(SPIFFS, "/index2.html", "text/html");
|
||||
request->send(LittleFS, "/index2.html", "text/html");
|
||||
});
|
||||
|
||||
if (Config.ota.username != "" && Config.ota.password != "") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue