fix(observer): recover T-Beam Supreme display startup
This commit is contained in:
1 parent
b744b42aab
commit
1f79e91c7f
5 files changed
+41
-10
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#ifdef DISPLAY_CLASS
|
||||
#include "UITask.h"
|
||||
static UITask ui_task(board, display);
|
||||
static bool display_ready = false;
|
||||
#endif
|
||||
|
||||
#ifdef ETHERNET_ENABLED
|
||||
@@ -52,7 +53,8 @@ void setup() {
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
if (display.begin()) {
|
||||
display_ready = display.begin();
|
||||
if (display_ready) {
|
||||
display.startFrame();
|
||||
display.setCursor(0, 0);
|
||||
display.print("Please wait...");
|
||||
@@ -112,7 +114,9 @@ void setup() {
|
||||
the_mesh.begin(fs);
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
|
||||
if (display_ready) {
|
||||
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ETHERNET_ENABLED
|
||||
@@ -193,7 +197,7 @@ void loop() {
|
||||
the_mesh.loop();
|
||||
sensors.loop();
|
||||
#ifdef DISPLAY_CLASS
|
||||
ui_task.loop();
|
||||
if (display_ready) ui_task.loop();
|
||||
#endif
|
||||
rtc_clock.tick();
|
||||
|
||||
|
||||
Reference in new issue
Block a user