From a57384f6c43a20281884cde5cd984af71ed89b0f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 14 Feb 2023 11:11:06 +0100 Subject: [PATCH] trace has settable div --- mission/trace.cpp | 4 ++-- mission/trace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mission/trace.cpp b/mission/trace.cpp index f12e5902..6c9af0af 100644 --- a/mission/trace.cpp +++ b/mission/trace.cpp @@ -2,9 +2,9 @@ #include "fsfw/serviceinterface.h" -void trace::threadTrace(uint32_t& counter, const char* name) { +void trace::threadTrace(uint32_t& counter, const char* name, unsigned div) { counter++; - if (counter % 5 == 0) { + if (counter % div == 0) { sif::debug << name << " running" << std::endl; } } diff --git a/mission/trace.h b/mission/trace.h index 6f20a698..59fdd99e 100644 --- a/mission/trace.h +++ b/mission/trace.h @@ -7,7 +7,7 @@ namespace trace { -void threadTrace(uint32_t& counter, const char* name); +void threadTrace(uint32_t& counter, const char* name, unsigned div = 5); }