Add guiTftInit

This commit is contained in:
fvanroie 2021-07-12 01:47:58 +02:00
parent 2a6c7d509d
commit 4ab180be26
2 changed files with 9 additions and 3 deletions

View File

@ -101,14 +101,19 @@ void guiCalibrate(void)
#endif #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() void guiSetup()
{ {
LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING)); LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING));
// Initialize the TFT // Initialize the TFT
haspTft.init(tft_width, tft_height); guiTftInit();
haspTft.set_rotation(gui_settings.rotation);
haspTft.set_invert(gui_settings.invert_display);
haspTft.show_info(); haspTft.show_info();
LOG_INFO(TAG_TFT, F(D_SERVICE_STARTED)); LOG_INFO(TAG_TFT, F(D_SERVICE_STARTED));

View File

@ -16,6 +16,7 @@ struct gui_conf_t
}; };
/* ===== Default Event Processors ===== */ /* ===== Default Event Processors ===== */
void guiTftInit(void);
void guiSetup(void); void guiSetup(void);
IRAM_ATTR void guiLoop(void); IRAM_ATTR void guiLoop(void);
void guiEverySecond(void); void guiEverySecond(void);