From e2a4acb29b4b9758659a8dfdbde99c2f96477068 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 2 Feb 2026 21:44:59 +0100 Subject: [PATCH] PR feedback --- TactilityKernel/Include/tactility/module.h | 2 +- TactilityKernel/Source/kernel_init.cpp | 2 +- TactilityKernel/Source/log.cpp | 4 ++-- Tests/Tactility/Main.cpp | 10 ++-------- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/TactilityKernel/Include/tactility/module.h b/TactilityKernel/Include/tactility/module.h index 0348d773..27ab6bab 100644 --- a/TactilityKernel/Include/tactility/module.h +++ b/TactilityKernel/Include/tactility/module.h @@ -81,6 +81,7 @@ error_t module_destruct(struct Module* module); /** * @brief Add a module to the system. + * @warning Only call this once. This function does not check if it was added before. * @param module module to add * @return ERROR_NONE if successful */ @@ -127,7 +128,6 @@ bool module_resolve_symbol(struct Module* module, const char* symbol_name, uintp /** * @brief Resolve a symbol from any module * @details This function iterates through all started modules in the parent and attempts to resolve the symbol. - * @param parent parent module * @param symbol_name name of the symbol to resolve * @param symbol_address pointer to store the address of the resolved symbol * @return true if the symbol was found, false otherwise diff --git a/TactilityKernel/Source/kernel_init.cpp b/TactilityKernel/Source/kernel_init.cpp index 419d857b..bc39ce7c 100644 --- a/TactilityKernel/Source/kernel_init.cpp +++ b/TactilityKernel/Source/kernel_init.cpp @@ -66,7 +66,7 @@ error_t kernel_init(struct Module* platform_module, struct Module* device_module LOG_I(TAG, "init done"); return ERROR_NONE; -}; +} #ifdef __cplusplus } diff --git a/TactilityKernel/Source/log.cpp b/TactilityKernel/Source/log.cpp index 1ad0b5b6..84ac4371 100644 --- a/TactilityKernel/Source/log.cpp +++ b/TactilityKernel/Source/log.cpp @@ -66,9 +66,9 @@ extern "C" { void log_generic(enum LogLevel level, const char* tag, const char* format, ...) { va_list args; va_start(args, format); - printf("%s %c (%" PRIu64 ") \033[37m%s\033[0m ", get_log_color(level), get_log_prefix(level), get_log_timestamp(), tag); + printf("%s %c (%" PRIu64 ") %s ", get_log_color(level), get_log_prefix(level), get_log_timestamp(), tag); vprintf(format, args); - printf("\n"); + printf("\033[0m\n"); va_end(args); } diff --git a/Tests/Tactility/Main.cpp b/Tests/Tactility/Main.cpp index 661e44ef..000dffd4 100644 --- a/Tests/Tactility/Main.cpp +++ b/Tests/Tactility/Main.cpp @@ -7,21 +7,15 @@ #include #include + typedef struct { int argc; char** argv; int result; } TestTaskData; -extern "C" { // From the relevant platform -extern struct Module platform_module; -} - -struct ModuleParent tactility_tests_module_parent { - "tactility-tests", - nullptr -}; +extern "C" struct Module platform_module; void test_task(void* parameter) { auto* data = (TestTaskData*)parameter;