Fixed remaining SPIFFS code
This commit is contained in:
parent
3affb69cb5
commit
83cd397494
|
@ -65,8 +65,9 @@ void setup() {
|
|||
|
||||
// start SPIFFS
|
||||
prnt(SETUP_MOUNT_SPIFFS);
|
||||
bool spiffsError = !LittleFS.begin();
|
||||
prntln(spiffsError ? SETUP_ERROR : SETUP_OK);
|
||||
//bool spiffsError = !LittleFS.begin();
|
||||
LittleFS.begin();
|
||||
prntln(/*spiffsError ? SETUP_ERROR : */SETUP_OK);
|
||||
|
||||
// Start EEPROM
|
||||
EEPROMHelper::begin(EEPROM_SIZE);
|
||||
|
@ -84,7 +85,7 @@ void setup() {
|
|||
#endif // ifdef FORMAT_EEPROM
|
||||
|
||||
// Format SPIFFS when in boot-loop
|
||||
if (spiffsError || !EEPROMHelper::checkBootNum(BOOT_COUNTER_ADDR)) {
|
||||
if (/*spiffsError || */!EEPROMHelper::checkBootNum(BOOT_COUNTER_ADDR)) {
|
||||
prnt(SETUP_FORMAT_SPIFFS);
|
||||
LittleFS.format();
|
||||
prntln(SETUP_OK);
|
||||
|
|
|
@ -332,7 +332,7 @@ void startAP(String path, String ssid, String password, uint8_t ch, bool hidden,
|
|||
});
|
||||
|
||||
// aggressively caching static assets
|
||||
server.serveStatic("/js", SPIFFS, String(wifi_config_path + "/js").c_str(), "max-age=86400");
|
||||
server.serveStatic("/js", LittleFS, String(wifi_config_path + "/js").c_str(), "max-age=86400");
|
||||
|
||||
// called when the url is not defined here
|
||||
// use it to load content from SPIFFS
|
||||
|
|
Loading…
Reference in New Issue