diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 819cced8..dc2adf24 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -101,14 +101,19 @@ void guiCalibrate(void) #endif } +void guiTftInit(void) +{ + haspTft.init(tft_width, tft_height); + haspTft.set_rotation(gui_settings.rotation); + haspTft.set_invert(gui_settings.invert_display); +} + void guiSetup() { LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING)); // Initialize the TFT - haspTft.init(tft_width, tft_height); - haspTft.set_rotation(gui_settings.rotation); - haspTft.set_invert(gui_settings.invert_display); + guiTftInit(); haspTft.show_info(); LOG_INFO(TAG_TFT, F(D_SERVICE_STARTED)); diff --git a/src/hasp_gui.h b/src/hasp_gui.h index 0c8a25d4..f37212a0 100644 --- a/src/hasp_gui.h +++ b/src/hasp_gui.h @@ -16,6 +16,7 @@ struct gui_conf_t }; /* ===== Default Event Processors ===== */ +void guiTftInit(void); void guiSetup(void); IRAM_ATTR void guiLoop(void); void guiEverySecond(void);