mirror of
https://github.com/correl/m5paper.git
synced 2024-11-24 03:00:10 +00:00
Fix OTA app
Clear screen on startup and remove artificial delay on shutdown.
This commit is contained in:
parent
2e538acca4
commit
94de526f52
1 changed files with 3 additions and 3 deletions
|
@ -16,6 +16,9 @@ public:
|
||||||
class OTA: public App {
|
class OTA: public App {
|
||||||
public:
|
public:
|
||||||
OTA() {
|
OTA() {
|
||||||
|
M5.Display.setEpdMode(epd_text);
|
||||||
|
M5.Display.clearDisplay(TFT_WHITE);
|
||||||
|
M5.Display.setFont(&fonts::Font0);
|
||||||
M5.Display.print("Connecting to WiFi");
|
M5.Display.print("Connecting to WiFi");
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
|
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
|
||||||
|
@ -52,10 +55,8 @@ public:
|
||||||
server->begin();
|
server->begin();
|
||||||
M5.Display.println("HTTP server started");
|
M5.Display.println("HTTP server started");
|
||||||
|
|
||||||
M5.Display.setEpdMode(epd_text);
|
|
||||||
M5.Display.startWrite();
|
M5.Display.startWrite();
|
||||||
M5.Display.clearDisplay(TFT_WHITE);
|
M5.Display.clearDisplay(TFT_WHITE);
|
||||||
M5.Display.setFont(&fonts::Font0);
|
|
||||||
M5.Display.setCursor(0, 10);
|
M5.Display.setCursor(0, 10);
|
||||||
M5.Display.printf("SSID: %s\n", WIFI_SSID);
|
M5.Display.printf("SSID: %s\n", WIFI_SSID);
|
||||||
M5.Display.printf("IP Address: %s\n", WiFi.localIP().toString());
|
M5.Display.printf("IP Address: %s\n", WiFi.localIP().toString());
|
||||||
|
@ -78,7 +79,6 @@ public:
|
||||||
M5.Display.print("Disconnecting WiFi...");
|
M5.Display.print("Disconnecting WiFi...");
|
||||||
WiFi.disconnect();
|
WiFi.disconnect();
|
||||||
M5.Display.println("ok");
|
M5.Display.println("ok");
|
||||||
delay(2000);
|
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
AsyncWebServer* server;
|
AsyncWebServer* server;
|
||||||
|
|
Loading…
Reference in a new issue