mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Move spiffsList function to spiffs
This commit is contained in:
parent
2aa5e59fea
commit
ec429820b4
@ -16,35 +16,12 @@
|
||||
#include "hasp_gui.h"
|
||||
#include "hasp_tft.h"
|
||||
#include "hasp_ota.h"
|
||||
#include "hasp_spiffs.h"
|
||||
#include "hasp.h"
|
||||
|
||||
//#define HASP_CONFIG_FILE F("/config.json")
|
||||
static const char HASP_CONFIG_FILE[] PROGMEM = "/config.json";
|
||||
|
||||
void spiffsList()
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
debugPrintln(F("FILE: Listing files on the internal flash:"));
|
||||
File root = SPIFFS.open("/");
|
||||
File file = root.openNextFile();
|
||||
while(file) {
|
||||
char msg[64];
|
||||
sprintf_P(msg, PSTR("FILE: * %s (%u bytes)"), file.name(), (uint32_t)file.size());
|
||||
debugPrintln(msg);
|
||||
file = root.openNextFile();
|
||||
}
|
||||
#endif
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
debugPrintln(F("FILE: Listing files on the internal flash:"));
|
||||
Dir dir = SPIFFS.openDir("/");
|
||||
while(dir.next()) {
|
||||
char msg[64];
|
||||
sprintf_P(msg, PSTR("FILE: * %s (%u bytes)"), dir.fileName().c_str(), (uint32_t)dir.fileSize());
|
||||
debugPrintln(msg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool configChanged()
|
||||
{
|
||||
return false;
|
||||
|
@ -18,8 +18,6 @@ const char F_CONFIG_SSID[] PROGMEM = "ssid";
|
||||
const char F_CONFIG_GROUP[] PROGMEM = "group";
|
||||
const char F_GUI_TICKPERIOD[] PROGMEM = "tickperiod";
|
||||
|
||||
void spiffsList();
|
||||
|
||||
void configSetup(JsonDocument & settings);
|
||||
void configLoop(void);
|
||||
void configStop(void);
|
||||
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
#include <FS.h> // Include the SPIFFS library
|
||||
#endif
|
||||
/*
|
||||
|
||||
void spiffsList()
|
||||
{
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
@ -35,7 +35,7 @@ void spiffsList()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
void spiffsSetup()
|
||||
{
|
||||
// no SPIFFS settings, as settings depend on SPIFFS
|
||||
|
@ -3,5 +3,6 @@
|
||||
|
||||
void spiffsSetup(void);
|
||||
void spiffsLoop(void);
|
||||
void spiffsList();
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user