Replaced Logger usage with LOG_x (#548)
This commit is contained in:
committed by
GitHub
parent
ecad2248d9
commit
9d5993930d
@@ -2,14 +2,14 @@
|
||||
|
||||
#include <tactility/check.h>
|
||||
#include <Tactility/hal/touch/TouchDevice.h>
|
||||
#include <Tactility/Logger.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <esp_err.h>
|
||||
#include <esp_lcd_panel_rgb.h>
|
||||
#include <esp_lcd_panel_ops.h>
|
||||
#include <esp_lvgl_port.h>
|
||||
|
||||
static const auto LOGGER = tt::Logger("RgbDisplay");
|
||||
constexpr auto* TAG = "RgbDisplay";
|
||||
|
||||
RgbDisplay::~RgbDisplay() {
|
||||
check(
|
||||
@@ -19,35 +19,35 @@ RgbDisplay::~RgbDisplay() {
|
||||
}
|
||||
|
||||
bool RgbDisplay::start() {
|
||||
LOGGER.info("Starting");
|
||||
LOG_I(TAG, "Starting");
|
||||
|
||||
if (esp_lcd_new_rgb_panel(&configuration->panelConfig, &panelHandle) != ESP_OK) {
|
||||
LOGGER.error("Failed to create panel");
|
||||
LOG_E(TAG, "Failed to create panel");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (esp_lcd_panel_reset(panelHandle) != ESP_OK) {
|
||||
LOGGER.error("Failed to reset panel");
|
||||
LOG_E(TAG, "Failed to reset panel");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (esp_lcd_panel_init(panelHandle) != ESP_OK) {
|
||||
LOGGER.error("Failed to init panel");
|
||||
LOG_E(TAG, "Failed to init panel");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (esp_lcd_panel_swap_xy(panelHandle, configuration->swapXY) != ESP_OK) {
|
||||
LOGGER.error("Failed to swap XY");
|
||||
LOG_E(TAG, "Failed to swap XY");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (esp_lcd_panel_mirror(panelHandle, configuration->mirrorX, configuration->mirrorY) != ESP_OK) {
|
||||
LOGGER.error("Failed to set panel to mirror");
|
||||
LOG_E(TAG, "Failed to set panel to mirror");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (esp_lcd_panel_invert_color(panelHandle, configuration->invertColor) != ESP_OK) {
|
||||
LOGGER.error("Failed to set panel to invert");
|
||||
LOG_E(TAG, "Failed to set panel to invert");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ bool RgbDisplay::stop() {
|
||||
}
|
||||
|
||||
if (displayDriver != nullptr && displayDriver.use_count() > 1) {
|
||||
LOGGER.warn("DisplayDriver is still in use.");
|
||||
LOG_W(TAG, "DisplayDriver is still in use.");
|
||||
}
|
||||
|
||||
auto touch_device = getTouchDevice();
|
||||
@@ -81,7 +81,7 @@ bool RgbDisplay::startLvgl() {
|
||||
assert(lvglDisplay == nullptr);
|
||||
|
||||
if (displayDriver != nullptr && displayDriver.use_count() > 1) {
|
||||
LOGGER.warn("DisplayDriver is still in use.");
|
||||
LOG_W(TAG, "DisplayDriver is still in use.");
|
||||
}
|
||||
|
||||
auto display_config = getLvglPortDisplayConfig();
|
||||
@@ -94,7 +94,7 @@ bool RgbDisplay::startLvgl() {
|
||||
};
|
||||
|
||||
lvglDisplay = lvgl_port_add_disp_rgb(&display_config, &rgb_config);
|
||||
LOGGER.info("Finished");
|
||||
LOG_I(TAG, "Finished");
|
||||
|
||||
auto touch_device = getTouchDevice();
|
||||
if (touch_device != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user