From 5aa1d225d7bad4d2cf8dafe139099f016936b9be Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Mon, 5 Jul 2021 21:49:18 -0700 Subject: [PATCH 1/6] Update xdrv_54_lvgl.ino Fix compile error with LVGL define and without USE_BERRY defined --- tasmota/xdrv_54_lvgl.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasmota/xdrv_54_lvgl.ino b/tasmota/xdrv_54_lvgl.ino index d72bb4cdd..0c7720708 100644 --- a/tasmota/xdrv_54_lvgl.ino +++ b/tasmota/xdrv_54_lvgl.ino @@ -42,6 +42,7 @@ Adafruit_LvGL_Glue * glue; // Logging // ************************************************** #if LV_USE_LOG +#ifdef USE_BERRY static void lvbe_debug(lv_log_level_t level, const char *file, uint32_t line, const char *fname, const char *msg); static void lvbe_debug(lv_log_level_t level, const char *file, uint32_t line, const char *fname, const char *msg) { be_writebuffer("LVG: ", sizeof("LVG: ")); @@ -51,6 +52,7 @@ static void lvbe_debug(lv_log_level_t level, const char *file, uint32_t line, co be_writebuffer("\n", sizeof("\n")); } #endif +#endif /************************************************************ * Main screen refresh function From c72465b0638d056c88fb6df86d84a75a562c79ac Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Sat, 10 Jul 2021 14:19:04 -0700 Subject: [PATCH 2/6] Update xdrv_54_lvgl.ino Fix compile error without Berry define. --- tasmota/xdrv_54_lvgl.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_54_lvgl.ino b/tasmota/xdrv_54_lvgl.ino index 0601ccd6b..68522a823 100644 --- a/tasmota/xdrv_54_lvgl.ino +++ b/tasmota/xdrv_54_lvgl.ino @@ -401,11 +401,11 @@ void start_lvgl(const char * uconfig) { #ifdef USE_BERRY lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, lv_color_from_uint32(USE_LVGL_BG_DEFAULT)); lv_obj_set_style_local_bg_opa(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_COVER); -#endif #if LV_USE_LOG lv_log_register_print_cb(lvbe_debug); #endif // LV_USE_LOG +#endif #ifdef USE_UFILESYS // Add file system mapping From 82e90220b4bf270b1e436f97d90e4467e7ddafc3 Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Sat, 10 Jul 2021 14:26:21 -0700 Subject: [PATCH 3/6] GPIO_XPT2046_CS is not specific to ILI9341 GPIO_XPT2046_CS is not specific to ILI9341 it is also used with ILI9488 --- tasmota/tasmota_template.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 6db361c33..c7b901e26 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -471,10 +471,12 @@ const uint16_t kGpioNiceList[] PROGMEM = { #ifdef USE_DISPLAY_ILI9341 AGPIO(GPIO_ILI9341_CS), AGPIO(GPIO_ILI9341_DC), +#endif // USE_DISPLAY_ILI9341 + #ifdef USE_XPT2046 AGPIO(GPIO_XPT2046_CS), // XPT2046 SPI Chip Select #endif -#endif // USE_DISPLAY_ILI9341 + #ifdef USE_DISPLAY_ILI9488 AGPIO(GPIO_ILI9488_CS), #endif // USE_DISPLAY_ILI9488 From b30d559c4d3ddb404de101670495e49b96d96330 Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Sun, 11 Jul 2021 11:53:36 -0700 Subject: [PATCH 4/6] Update tasmota_lv_conf.h --- tasmota/lvgl_berry/tasmota_lv_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/lvgl_berry/tasmota_lv_conf.h b/tasmota/lvgl_berry/tasmota_lv_conf.h index 5d31e8a2e..a52cb9a7e 100644 --- a/tasmota/lvgl_berry/tasmota_lv_conf.h +++ b/tasmota/lvgl_berry/tasmota_lv_conf.h @@ -501,7 +501,7 @@ typedef void * lv_font_user_data_t; * texts and borders will be black and the background will be * white. Else the colors are inverted. * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ -#define LV_USE_THEME_MONO 0 +#define LV_USE_THEME_MONO 1 #define LV_THEME_DEFAULT_INCLUDE /*Include a header for the init. function*/ #define LV_THEME_DEFAULT_INIT lv_theme_material_init From 207298271aef4cde0d50faa1f2e796c96dd85418 Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Thu, 21 Oct 2021 13:20:43 -0700 Subject: [PATCH 5/6] Revert "Update tasmota_lv_conf.h" This reverts commit b30d559c4d3ddb404de101670495e49b96d96330. --- tasmota/lvgl_berry/tasmota_lv_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/lvgl_berry/tasmota_lv_conf.h b/tasmota/lvgl_berry/tasmota_lv_conf.h index a52cb9a7e..5d31e8a2e 100644 --- a/tasmota/lvgl_berry/tasmota_lv_conf.h +++ b/tasmota/lvgl_berry/tasmota_lv_conf.h @@ -501,7 +501,7 @@ typedef void * lv_font_user_data_t; * texts and borders will be black and the background will be * white. Else the colors are inverted. * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ -#define LV_USE_THEME_MONO 1 +#define LV_USE_THEME_MONO 0 #define LV_THEME_DEFAULT_INCLUDE /*Include a header for the init. function*/ #define LV_THEME_DEFAULT_INIT lv_theme_material_init From 67a7e28b7895f45f308410a13b614a3989ded796 Mon Sep 17 00:00:00 2001 From: mikep1998 <44448320+mikep1998@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:11:21 -0700 Subject: [PATCH 6/6] WIFI connection retry Allow #define to change wifi connection timeout. --- tasmota/support_wifi.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/support_wifi.ino b/tasmota/support_wifi.ino index ff5f48d51..bf80f579e 100644 --- a/tasmota/support_wifi.ino +++ b/tasmota/support_wifi.ino @@ -32,10 +32,13 @@ #ifndef WIFI_RESCAN_MINUTES #define WIFI_RESCAN_MINUTES 44 // Number of minutes between wifi network rescan #endif +#ifndef WIFI_RETRY_SECONDS +#define WIFI_RETRY_SECONDS 12 // Number of seconds connection to wifi network will retry +#endif const uint8_t WIFI_CONFIG_SEC = 180; // seconds before restart const uint8_t WIFI_CHECK_SEC = 20; // seconds -const uint8_t WIFI_RETRY_OFFSET_SEC = 12; // seconds +const uint8_t WIFI_RETRY_OFFSET_SEC = WIFI_RETRY_SECONDS; // seconds #include // Wifi, MQTT, Ota, WifiManager #if LWIP_IPV6