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
@@ -1,4 +1,6 @@
#include <Tactility/Tactility.h>
#include <Tactility/Logger.h>
#include <Tactility/lvgl/Statusbar.h>
#include <Tactility/service/ServiceContext.h>
#include <Tactility/service/ServiceManifest.h>
@@ -7,7 +9,7 @@
namespace tt::service::memorychecker {
constexpr const char* TAG = "MemoryChecker";
static const auto LOGGER = Logger("MemoryChecker");
// Total memory (in bytes) that should be free before warnings occur
constexpr auto TOTAL_FREE_THRESHOLD = 10'000;
@@ -36,13 +38,13 @@ static bool isMemoryLow() {
bool memory_low = false;
const auto total_free = getInternalFree();
if (total_free < TOTAL_FREE_THRESHOLD) {
TT_LOG_W(TAG, "Internal memory low: %zu bytes", total_free);
LOGGER.warn("Internal memory low: {} bytes", total_free);
memory_low = true;
}
const auto largest_block = getInternalLargestFreeBlock();
if (largest_block < LARGEST_FREE_BLOCK_THRESHOLD) {
TT_LOG_W(TAG, "Largest free internal memory block is %zu bytes", largest_block);
LOGGER.warn("Largest free internal memory block is {} bytes", largest_block);
memory_low = true;
}