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
+6 -6
View File
@@ -1,7 +1,7 @@
#include "Bq24295.h"
#include <Tactility/Log.h>
#include <Tactility/Logger.h>
#define TAG "bq24295"
static const auto LOGGER = tt::Logger("BQ24295");
/** Reference:
* https://www.ti.com/lit/ds/symlink/bq24295.pdf
@@ -49,8 +49,8 @@ bool Bq24295::setWatchDogTimer(WatchDogTimer in) const {
if (readChargeTermination(value)) {
uint8_t bits_to_set = 0b00110000 & static_cast<uint8_t>(in);
uint8_t value_cleared = value & 0b11001111;
uint8_t to_set = bits_to_set & value_cleared;
TT_LOG_I(TAG, "WatchDogTimer: %02x -> %02x", value, to_set);
uint8_t to_set = bits_to_set | value_cleared;
LOGGER.info("WatchDogTimer: {:02x} -> {:02x}", value, to_set);
return writeRegister8(registers::CHARGE_TERMINATION, to_set);
}
@@ -96,9 +96,9 @@ bool Bq24295::getVersion(uint8_t& value) const {
void Bq24295::printInfo() const {
uint8_t version, status, charge_termination;
if (getStatus(status) && getVersion(version) && readChargeTermination(charge_termination)) {
TT_LOG_I(TAG, "Version %d, status %02x, charge termination %02x", version, status, charge_termination);
LOGGER.info("Version {}, status {:02x}, charge termination {:02x}", version, status, charge_termination);
} else {
TT_LOG_E(TAG, "Failed to retrieve version and/or status");
LOGGER.error("Failed to retrieve version and/or status");
}
}