From 6a9c030d8c1ff70c1eb60f14e668bd4c91ad51a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChl?= Date: Tue, 4 Apr 2023 15:51:09 +0200 Subject: [PATCH] update --- src/DisplayManager.cpp | 7 ++++--- src/Globals.cpp | 4 ++-- src/ServerManager.cpp | 2 +- src/main.cpp | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/DisplayManager.cpp b/src/DisplayManager.cpp index 92c9035..fd6d5a6 100644 --- a/src/DisplayManager.cpp +++ b/src/DisplayManager.cpp @@ -90,6 +90,7 @@ bool DisplayManager_::setAutoTransition(bool active) ui->disablesetAutoTransition(); return false; } + showGif = false; } void DisplayManager_::drawGIF(uint16_t x, uint16_t y, fs::File gFile) @@ -258,14 +259,15 @@ void DisplayManager_::generateCustomPage(const String &name, const char *json) Serial.println("delete"); customApps.erase(customApps.find(name)); removeCustomApp(name); + showGif = false; return; } - DynamicJsonDocument doc(1024); DeserializationError error = deserializeJson(doc, json); if (error) { + showGif = false; doc.clear(); return; } @@ -458,7 +460,7 @@ void DisplayManager_::generateNotification(const char *json) notify.color = TEXTCOLOR_565; } - notify.flag = true; + notify.flag = true; showGif = false; if (doc.containsKey("icon")) @@ -487,7 +489,6 @@ void DisplayManager_::generateNotification(const char *json) fs::File nullPointer; notify.icon = nullPointer; } - } void DisplayManager_::loadNativeApps() diff --git a/src/Globals.cpp b/src/Globals.cpp index 18f8270..b5f3ed5 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -75,7 +75,7 @@ void loadSettings() TEXTCOLOR_565 = Settings.getUInt("COL", 0xFFFF); AUTO_TRANSITION = Settings.getBool("TRANS", true); TIME_PER_TRANSITION = Settings.getUInt("TSPEED", 400); - TIME_PER_APP = Settings.getUInt("ADUR", 5000); + TIME_PER_APP = Settings.getUInt("ADUR", 7000); TIME_FORMAT = Settings.getString("TFORMAT", "%H:%M:%S"); DATE_FORMAT = Settings.getString("DFORMAT", "%d.%m.%y"); START_ON_MONDAY = Settings.getBool("SOM", true); @@ -161,7 +161,7 @@ String NET_PDNS = "8.8.8.8"; String NET_SDNS = "1.1.1.1"; int TIME_PER_APP = 7000; uint8_t MATRIX_FPS = 23; -int TIME_PER_TRANSITION = 500; +int TIME_PER_TRANSITION = 400; String NTP_SERVER = "de.pool.ntp.org"; String NTP_TZ = "CET-1CEST,M3.5.0,M10.5.0/3"; bool HA_DISCOVERY = false; diff --git a/src/ServerManager.cpp b/src/ServerManager.cpp index 046a058..3daf88c 100644 --- a/src/ServerManager.cpp +++ b/src/ServerManager.cpp @@ -50,7 +50,7 @@ void ServerManager_::setup() isConnected = !(myIP == IPAddress(192, 168, 4, 1)); Serial.println(myIP.toString()); - + Serial.println(isConnected); if (isConnected) { diff --git a/src/main.cpp b/src/main.cpp index a4d9920..db03e9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,7 +62,6 @@ void setup() loadSettings(); Serial.begin(115200); PeripheryManager.setup(); - delay(500); ServerManager.loadSettings(); DisplayManager.setup(); DisplayManager.HSVtext(9, 6, VERSION, true); @@ -70,7 +69,6 @@ void setup() PeripheryManager.playBootSound(); xTaskCreatePinnedToCore(BootAnimation, "Task", 10000, NULL, 1, &taskHandle, 1); ServerManager.setup(); - if (ServerManager.isConnected) { MQTTManager.setup();