Replaced Logger usage with LOG_x (#548)
This commit is contained in:
committed by
GitHub
parent
ecad2248d9
commit
9d5993930d
@@ -1,20 +1,20 @@
|
||||
#include <Tactility/Logger.h>
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <tactility/check.h>
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
#include <tactility/hal/Device.h>
|
||||
|
||||
#include <Tactility/hal/display/DisplayDevice.h>
|
||||
#include <Tactility/hal/SdCard.h>
|
||||
#include <Tactility/hal/touch/TouchDevice.h>
|
||||
#include <Tactility/kernel/SystemEvents.h>
|
||||
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/hal/Device.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
namespace tt::hal {
|
||||
|
||||
static const auto LOGGER = Logger("Hal");
|
||||
constexpr auto* TAG = "Hal";
|
||||
|
||||
void registerDevices(const Configuration& configuration) {
|
||||
LOGGER.info("Registering devices");
|
||||
LOG_I(TAG, "Registering devices");
|
||||
|
||||
auto devices = configuration.createDevices();
|
||||
for (auto& device : devices) {
|
||||
@@ -33,27 +33,27 @@ void registerDevices(const Configuration& configuration) {
|
||||
}
|
||||
|
||||
static void startDisplays() {
|
||||
LOGGER.info("Starting displays & touch");
|
||||
LOG_I(TAG, "Starting displays & touch");
|
||||
auto displays = hal::findDevices<display::DisplayDevice>(Device::Type::Display);
|
||||
for (auto& display : displays) {
|
||||
LOGGER.info("{} starting", display->getName());
|
||||
LOG_I(TAG, "%s starting", display->getName().c_str());
|
||||
if (!display->start()) {
|
||||
LOGGER.error("{} start failed", display->getName());
|
||||
LOG_E(TAG, "%s start failed", display->getName().c_str());
|
||||
} else {
|
||||
LOGGER.info("{} started", display->getName());
|
||||
LOG_I(TAG, "%s started", display->getName().c_str());
|
||||
|
||||
if (display->supportsBacklightDuty()) {
|
||||
LOGGER.info("Setting backlight");
|
||||
LOG_I(TAG, "Setting backlight");
|
||||
display->setBacklightDuty(0);
|
||||
}
|
||||
|
||||
auto touch = display->getTouchDevice();
|
||||
if (touch != nullptr) {
|
||||
LOGGER.info("{} starting", touch->getName());
|
||||
LOG_I(TAG, "%s starting", touch->getName().c_str());
|
||||
if (!touch->start()) {
|
||||
LOGGER.error("{} start failed", touch->getName());
|
||||
LOG_E(TAG, "%s start failed", touch->getName().c_str());
|
||||
} else {
|
||||
LOGGER.info("{} started", touch->getName());
|
||||
LOG_I(TAG, "%s started", touch->getName().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user