Updated esp32 code
This commit is contained in:
parent
9712e13c78
commit
4e37b9329c
@ -1210,9 +1210,20 @@ bool WebServerHandler::setupWebServer() {
|
||||
}
|
||||
}
|
||||
#else // defined( ESP32 )
|
||||
File root = LittleFS.open("/");
|
||||
File f = root.openNextFile();
|
||||
while (f) {
|
||||
Log.notice(F("WEB : File=%s, %d bytes" CR), f.name(),
|
||||
f.size());
|
||||
if (!f.size()) {
|
||||
Log.notice(F("WEB : Empty file detected, removing file." CR));
|
||||
LittleFS.remove(f.name());
|
||||
}
|
||||
|
||||
#warning "Implement file listning for ESP32"
|
||||
|
||||
f = root.openNextFile();
|
||||
}
|
||||
f.close();
|
||||
root.close();
|
||||
#endif
|
||||
|
||||
// Static content
|
||||
|
@ -74,10 +74,7 @@ bool WifiConnection::hasConfig() {
|
||||
if (strlen(userSSID)) return true;
|
||||
|
||||
// Check if there are stored WIFI Settings we can use.
|
||||
#if defined(ESP32)
|
||||
#warning \
|
||||
"Cant read SSID on ESP32 until a connection has been made, this part will not work, change to WifiManager"
|
||||
#endif
|
||||
#if defined(ESP8266)
|
||||
String ssid = WiFi.SSID();
|
||||
if (ssid.length()) {
|
||||
Log.notice(F("WIFI: Found credentials in EEPORM." CR));
|
||||
@ -88,6 +85,10 @@ bool WifiConnection::hasConfig() {
|
||||
myConfig.saveFile();
|
||||
return true;
|
||||
}
|
||||
#else // defined( ESP32 )
|
||||
#warning "Cant read SSID property on ESP32 until a connection has been made!"
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user