New logging and more (#446)

- `TT_LOG_*` macros are replaced by `Logger` via `#include<Tactility/Logger.h>`
- Changed default timezone to Europe/Amsterdam
- Fix for logic bug in unPhone hardware
- Fix for init/deinit in DRV2605 driver
- Other fixes
- Removed optimization that broke unPhone (disabled the moving of heap-related functions to flash)
This commit is contained in:
Ken Van Hoeylandt
2026-01-06 22:35:39 +01:00
committed by GitHub
parent 719f7bcece
commit f620255c41
188 changed files with 1973 additions and 1755 deletions
+7 -6
View File
@@ -1,8 +1,8 @@
#include "PwmBacklight.h"
#include <Tactility/Log.h>
#include <Tactility/Logger.h>
#define TAG "pwm_backlight"
static const auto LOGGER = tt::Logger("PwmBacklight");
namespace driver::pwmbacklight {
@@ -16,7 +16,7 @@ bool init(gpio_num_t pin, uint32_t frequencyHz, ledc_timer_t timer, ledc_channel
backlightTimer = timer;
backlightChannel = channel;
TT_LOG_I(TAG, "Init");
LOGGER.info("Init");
ledc_timer_config_t ledc_timer = {
.speed_mode = LEDC_LOW_SPEED_MODE,
.duty_resolution = LEDC_TIMER_8_BIT,
@@ -27,7 +27,7 @@ bool init(gpio_num_t pin, uint32_t frequencyHz, ledc_timer_t timer, ledc_channel
};
if (ledc_timer_config(&ledc_timer) != ESP_OK) {
TT_LOG_E(TAG, "Timer config failed");
LOGGER.error("Timer config failed");
return false;
}
@@ -46,7 +46,8 @@ bool init(gpio_num_t pin, uint32_t frequencyHz, ledc_timer_t timer, ledc_channel
};
if (ledc_channel_config(&ledc_channel) != ESP_OK) {
TT_LOG_E(TAG, "Channel config failed");
LOGGER.error("Channel config failed");
return false;
}
isBacklightInitialized = true;
@@ -56,7 +57,7 @@ bool init(gpio_num_t pin, uint32_t frequencyHz, ledc_timer_t timer, ledc_channel
bool setBacklightDuty(uint8_t duty) {
if (!isBacklightInitialized) {
TT_LOG_E(TAG, "Not initialized");
LOGGER.error("Not initialized");
return false;
}
return ledc_set_duty(LEDC_LOW_SPEED_MODE, backlightChannel, duty) == ESP_OK &&