diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 78aca9e2..e40acd88 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -363,8 +363,8 @@ void haspSetup(void) if(haspFonts[3] == nullptr) haspFonts[3] = LV_THEME_DEFAULT_FONT_TITLE; // haspFonts[0] = lv_font_load("E:/font_1.fnt"); - // haspFonts[2] = lv_font_load("E:/font_2.fnt"); - // haspFonts[3] = lv_font_load("E:/font_3.fnt"); + // haspFonts[2] = lv_font_load("E:/font_2.fnt"); + // haspFonts[3] = lv_font_load("E:/font_3.fnt"); /* ********** Theme Initializations ********** */ if(haspThemeId == 8) haspThemeId = 1; // update old HASP id @@ -461,7 +461,7 @@ void haspSetup(void) hasp_init(); hasp_load_json(); - haspPages.set(haspStartPage, LV_SCR_LOAD_ANIM_NONE); + haspPages.set(haspStartPage, LV_SCR_LOAD_ANIM_FADE_ON); } /********************** diff --git a/src/hasp/hasp_object.cpp b/src/hasp/hasp_object.cpp index e443f15d..fd204496 100644 --- a/src/hasp/hasp_object.cpp +++ b/src/hasp/hasp_object.cpp @@ -249,7 +249,8 @@ static int hasp_parse_json_attributes(lv_obj_t* obj, const JsonObject& doc) std::string v; for(JsonPair keyValue : doc) { - LOG_VERBOSE(TAG_HASP, F(D_BULLET "%s=%s"), keyValue.key().c_str(), keyValue.value().as().c_str()); + // LOG_VERBOSE(TAG_HASP, F(D_BULLET "%s=%s"), keyValue.key().c_str(), + // keyValue.value().as().c_str()); v = keyValue.value().as(); hasp_process_obj_attribute(obj, keyValue.key().c_str(), keyValue.value().as().c_str(), true); i++; @@ -259,7 +260,7 @@ static int hasp_parse_json_attributes(lv_obj_t* obj, const JsonObject& doc) v.reserve(64); for(JsonPair keyValue : doc) { - LOG_DEBUG(TAG_HASP, F(D_BULLET "%s=%s"), keyValue.key().c_str(), keyValue.value().as().c_str()); + // LOG_DEBUG(TAG_HASP, F(D_BULLET "%s=%s"), keyValue.key().c_str(), keyValue.value().as().c_str()); v = keyValue.value().as(); hasp_process_obj_attribute(obj, keyValue.key().c_str(), keyValue.value().as().c_str(), true); i++; diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 3b57ccc7..87df5e69 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -298,6 +298,8 @@ void guiSetup() IRAM_ATTR void guiLoop(void) { + lv_task_handler(); // process animations + #if defined(STM32F4xx) // tick.update(); #endif diff --git a/src/log/hasp_debug.cpp b/src/log/hasp_debug.cpp index 3e41b88b..3208e9b1 100644 --- a/src/log/hasp_debug.cpp +++ b/src/log/hasp_debug.cpp @@ -319,25 +319,7 @@ void debugSetup(JsonObject settings) } IRAM_ATTR void debugLoop(void) -{ - /* int16_t keypress; - do { - switch(keypress = debugConsole.readKey()) { - - case ConsoleInput::KEY_PAGE_UP: - dispatch_page_next(LV_SCR_LOAD_ANIM_NONE); - break; - - case ConsoleInput::KEY_PAGE_DOWN: - dispatch_page_prev(LV_SCR_LOAD_ANIM_NONE); - break; - - case(ConsoleInput::KEY_FN)...(ConsoleInput::KEY_FN + 12): - dispatch_set_page(keypress - ConsoleInput::KEY_FN, LV_SCR_LOAD_ANIM_NONE); - break; - } - } while(keypress != 0); */ -} +{} void printLocalTime() { diff --git a/src/main_arduino copy.cpp b/src/main_arduino copy.cpp index 0e2b192d..eef0a3f5 100644 --- a/src/main_arduino copy.cpp +++ b/src/main_arduino copy.cpp @@ -104,7 +104,7 @@ void setup() #endif mainLastLoopTime = millis() - 1000; // reset loop counter - delay(250); + delay(20); guiStart(); } diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp index dbbe961c..d8d2f800 100644 --- a/src/main_arduino.cpp +++ b/src/main_arduino.cpp @@ -115,7 +115,7 @@ void setup() IRAM_ATTR void loop() { guiLoop(); - haspLoop(); + // haspLoop(); networkLoop(); #if HASP_USE_GPIO > 0 @@ -126,10 +126,10 @@ IRAM_ATTR void loop() mqttLoop(); #endif // MQTT - // debugLoop(); haspDevice.loop(); #if HASP_USE_CONSOLE > 0 + // debugLoop(); consoleLoop(); #endif @@ -137,8 +137,8 @@ IRAM_ATTR void loop() if(millis() - mainLastLoopTime >= 1000) { /* Runs Every Second */ - haspEverySecond(); // sleep timer - debugEverySecond(); // statusupdate + haspEverySecond(); // sleep timer & statusupdate + // debugEverySecond(); /* Runs Every 5 Seconds */ if(mainLoopCounter == 0 || mainLoopCounter == 5) { @@ -165,6 +165,7 @@ IRAM_ATTR void loop() } else { mainLoopCounter++; } + mainLastLoopTime += 1000; }