mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Fix lovyan driver issue
This commit is contained in:
parent
0b5eb9bb41
commit
e973fe2b16
@ -492,22 +492,21 @@ void LovyanGfx::init(int w, int h)
|
||||
|
||||
Preferences preferences;
|
||||
preferences.begin("tft", false);
|
||||
this->tft_driver = preferences.getUInt("DRIVER", get_tft_driver());
|
||||
|
||||
lgfx::IBus* _bus_instance = _init_bus(&preferences);
|
||||
this->tft_driver = preferences.getUInt("DRIVER", get_tft_driver());
|
||||
lgfx::Panel_Device* _panel_instance = _init_panel(_bus_instance);
|
||||
lgfx::ITouch* _touch_instance = _init_touch(&preferences);
|
||||
|
||||
if(_panel_instance != nullptr) {
|
||||
_panel_instance->setBus(_bus_instance);
|
||||
configure_panel(_panel_instance, &preferences);
|
||||
}
|
||||
|
||||
lgfx::ITouch* touch = _init_touch(&preferences);
|
||||
#endif
|
||||
|
||||
tft.setPanel(_panel_instance);
|
||||
|
||||
lgfx::v1::ITouch* touch = _panel_instance->getTouch();
|
||||
if(touch) {
|
||||
if(_touch_instance) {
|
||||
LOG_INFO(TAG_TFT, F("Touch " D_SERVICE_STARTED));
|
||||
} else {
|
||||
LOG_WARNING(TAG_TFT, F("Touch " D_SERVICE_START_FAILED));
|
||||
|
Loading…
x
Reference in New Issue
Block a user