20 extern WIFI_State *wifi_state; |
20 extern WIFI_State *wifi_state; |
21 |
21 |
22 int Main_Screen = MAIN_MODE_UNKNOWN; ///< Screen number |
22 int Main_Screen = MAIN_MODE_UNKNOWN; ///< Screen number |
23 int Old_Screen = MAIN_MODE_UNKNOWN; ///< Previous screen number |
23 int Old_Screen = MAIN_MODE_UNKNOWN; ///< Previous screen number |
24 bool System_TimeOk = false; ///< System time status |
24 bool System_TimeOk = false; ///< System time status |
25 |
25 const esp_app_desc_t *app_desc = NULL; |
26 |
26 |
27 |
27 |
28 void app_main() |
28 void app_main() |
29 { |
29 { |
30 int tempy; |
30 int tempy; |
34 init_tft_display(); |
34 init_tft_display(); |
35 |
35 |
36 TFT_setFont(DEJAVU24_FONT, NULL); |
36 TFT_setFont(DEJAVU24_FONT, NULL); |
37 _fg = TFT_YELLOW; |
37 _fg = TFT_YELLOW; |
38 tempy = TFT_getfontheight() + 4; |
38 tempy = TFT_getfontheight() + 4; |
39 sprintf(temp, "BrewBoard %s", VERSION); |
39 app_desc = esp_ota_get_app_description(); |
|
40 sprintf(temp, "BrewBoard %s", app_desc->version); |
40 TFT_print(temp, CENTER, 4); |
41 TFT_print(temp, CENTER, 4); |
41 |
42 |
42 TFT_setFont(DEJAVU18_FONT, NULL); |
43 TFT_setFont(DEJAVU18_FONT, NULL); |
43 _fg = TFT_CYAN; |
44 _fg = TFT_CYAN; |
44 TFT_print("Mount /spiffs ", 0, LASTY+tempy); |
45 TFT_print("Mount /spiffs ", 0, LASTY+tempy); |