fix display boot loop

This commit is contained in:
Siwat Sirichai 2024-04-06 12:21:46 +07:00
parent cb0c3ecd8b
commit 1075ec5f99
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
* Variants *
***********************************************/
// @note You can use -D flag to define the variant and comment out the line below
#define AC_TYPE AC_TYPE_M3M4M5M6
#define AC_TYPE AC_TYPE_M1M2
/***********************************************
* Pin Definitions *

View File

@ -158,6 +158,9 @@ void CUDDisplay::begin(cud_display_cards_t cards)
// Initialize the display
ESP_LOGV("CUD Display", "Initializing display");
this->sendStopBytes();
this->reset();
vTaskDelay(1000 / portTICK_PERIOD_MS);
this->display_init();
}
@ -231,7 +234,6 @@ void CUDDisplay::display_init()
{
// Perform a reset on the display
ESP_LOGV("CUD Display", "Resetting display");
this->reset();
vTaskDelay(1000 / portTICK_PERIOD_MS);
// Set the display to the main screen
ESP_LOGV("CUD Display", "Setting display to main screen");