Replaced Logger usage with LOG_x (#548)
This commit is contained in:
committed by
GitHub
parent
ecad2248d9
commit
9d5993930d
@@ -2,21 +2,21 @@
|
||||
|
||||
|
||||
#include <EspLcdTouchDriver.h>
|
||||
#include <Tactility/Logger.h>
|
||||
#include <tactility/log.h>
|
||||
#include <esp_lvgl_port_touch.h>
|
||||
|
||||
static const auto LOGGER = tt::Logger("EspLcdTouch");
|
||||
constexpr auto* TAG = "EspLcdTouch";
|
||||
|
||||
bool EspLcdTouch::start() {
|
||||
if (!createIoHandle(ioHandle) != ESP_OK) {
|
||||
LOGGER.error("Touch IO failed");
|
||||
LOG_E(TAG, "Touch IO failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
config = createEspLcdTouchConfig();
|
||||
|
||||
if (!createTouchHandle(ioHandle, config, touchHandle)) {
|
||||
LOGGER.error("Driver init failed");
|
||||
LOG_E(TAG, "Driver init failed");
|
||||
esp_lcd_panel_io_del(ioHandle);
|
||||
ioHandle = nullptr;
|
||||
return false;
|
||||
@@ -49,7 +49,7 @@ bool EspLcdTouch::startLvgl(lv_disp_t* display) {
|
||||
}
|
||||
|
||||
if (touchDriver != nullptr && touchDriver.use_count() > 1) {
|
||||
LOGGER.warn("TouchDriver is still in use.");
|
||||
LOG_W(TAG, "TouchDriver is still in use.");
|
||||
}
|
||||
|
||||
const lvgl_port_touch_cfg_t touch_cfg = {
|
||||
@@ -57,10 +57,10 @@ bool EspLcdTouch::startLvgl(lv_disp_t* display) {
|
||||
.handle = touchHandle,
|
||||
};
|
||||
|
||||
LOGGER.info("Adding touch to LVGL");
|
||||
LOG_I(TAG, "Adding touch to LVGL");
|
||||
lvglDevice = lvgl_port_add_touch(&touch_cfg);
|
||||
if (lvglDevice == nullptr) {
|
||||
LOGGER.error("Adding touch failed");
|
||||
LOG_E(TAG, "Adding touch failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user