From 187d99c0f710cf4827a026f02e41ebbd2b1271e2 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 27 Jan 2022 23:10:59 +0100 Subject: SystemMonitor: implement FreeRtosMonitor only if trace facility is set Split SystemMonitor into h and cpp file and move the logging code of the `Process` function into the cpp file. Depending of the `configUSE_TRACE_FACILITY` define from `src/FreeRTOSConfig.h` create either a "FreeRtosMonitor" or a "DummyMonitor". Make the `Process()` function non-const, as the FreeRtosMonitor changes the member variable `lastTick`. In `SystemTask.h` we then only need to use `SystemMonitor`, without knowledge of the `configUSE_TRACE_FACILITY` define. --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 025fc330..ff0c9b0c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -516,6 +516,7 @@ list(APPEND SOURCE_FILES displayapp/lv_pinetime_theme.c systemtask/SystemTask.cpp + systemtask/SystemMonitor.cpp drivers/TwiMaster.cpp heartratetask/HeartRateTask.cpp @@ -577,6 +578,7 @@ list(APPEND RECOVERY_SOURCE_FILES FreeRTOS/port_cmsis.c systemtask/SystemTask.cpp + systemtask/SystemMonitor.cpp drivers/TwiMaster.cpp components/gfx/Gfx.cpp components/rle/RleDecoder.cpp -- cgit v1.2.3-70-g09d2