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
+5 -5
View File
@@ -1,14 +1,14 @@
#include "LvglTask.h"
#include <Tactility/Check.h>
#include <Tactility/Thread.h>
#include <Tactility/Log.h>
#include <Tactility/Logger.h>
#include <Tactility/RecursiveMutex.h>
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/Check.h>
#include <lvgl.h>
constexpr auto TAG = "lvgl_task";
static const auto LOGGER = tt::Logger("LvglTask");
// Mutex for LVGL drawing
static tt::RecursiveMutex lvgl_mutex;
@@ -58,7 +58,7 @@ void lvgl_task_interrupt() {
}
void lvgl_task_start() {
TT_LOG_I(TAG, "lvgl task starting");
LOGGER.info("LVGL task starting");
tt::lvgl::syncSet(&lvgl_lock, &lvgl_unlock);
@@ -76,7 +76,7 @@ void lvgl_task_start() {
}
static void lvgl_task(TT_UNUSED void* arg) {
TT_LOG_I(TAG, "lvgl task started");
LOGGER.info("LVGL task started");
/** Ideally. the display handle would be created during Simulator.start(),
* but somehow that doesn't work. Waiting here from a ThreadFlag when that happens
+4 -6
View File
@@ -5,7 +5,7 @@
#include "FreeRTOS.h"
#include "task.h"
#define TAG "freertos"
static const auto LOGGER = tt::Logger("FreeRTOS");
namespace simulator {
@@ -16,10 +16,10 @@ void setMain(MainFunction newMainFunction) {
}
static void freertosMainTask(TT_UNUSED void* parameter) {
TT_LOG_I(TAG, "starting app_main()");
LOGGER.info("starting app_main()");
assert(simulator::mainFunction);
mainFunction();
TT_LOG_I(TAG, "returned from app_main()");
LOGGER.info("returned from app_main()");
vTaskDelete(nullptr);
}
@@ -46,10 +46,8 @@ void freertosMain() {
* It allows you to set breakpoints and debug asserts.
*/
void vAssertCalled(unsigned long line, const char* const file) {
static portBASE_TYPE xPrinted = pdFALSE;
volatile uint32_t set_to_nonzero_in_debugger_to_continue = 0;
TT_LOG_E(TAG, "assert triggered at %s:%d", file, line);
LOGGER.error("Assert triggered at {}:{}", file, line);
taskENTER_CRITICAL();
{
// Step out by attaching a debugger and setting set_to_nonzero_in_debugger_to_continue