Fix OTA app

Clear screen on startup and remove artificial delay on shutdown.
This commit is contained in:
Correl Roush 2023-01-28 22:58:04 -05:00
parent 2e538acca4
commit 94de526f52

View file

@ -16,6 +16,9 @@ public:
class OTA: public App {
public:
OTA() {
M5.Display.setEpdMode(epd_text);
M5.Display.clearDisplay(TFT_WHITE);
M5.Display.setFont(&fonts::Font0);
M5.Display.print("Connecting to WiFi");
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
@ -52,10 +55,8 @@ public:
server->begin();
M5.Display.println("HTTP server started");
M5.Display.setEpdMode(epd_text);
M5.Display.startWrite();
M5.Display.clearDisplay(TFT_WHITE);
M5.Display.setFont(&fonts::Font0);
M5.Display.setCursor(0, 10);
M5.Display.printf("SSID: %s\n", WIFI_SSID);
M5.Display.printf("IP Address: %s\n", WiFi.localIP().toString());
@ -78,7 +79,6 @@ public:
M5.Display.print("Disconnecting WiFi...");
WiFi.disconnect();
M5.Display.println("ok");
delay(2000);
}
protected:
AsyncWebServer* server;