From b6a3605474e6386a6c011b139c405bcd205e466b Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Fri, 21 Feb 2020 14:09:13 +0100 Subject: [PATCH] #556 Moved log and params from tdoa3 to todo engine instance. Compatibility break: log and param group names are changed from "tdoa3" to "todaEngine". --- src/deck/drivers/src/lpsTdoa3Tag.c | 22 ---------------------- src/modules/src/tdoaEngineInstance.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/deck/drivers/src/lpsTdoa3Tag.c b/src/deck/drivers/src/lpsTdoa3Tag.c index 0d658ed29e..8f9e5620f3 100644 --- a/src/deck/drivers/src/lpsTdoa3Tag.c +++ b/src/deck/drivers/src/lpsTdoa3Tag.c @@ -58,8 +58,6 @@ The implementation must handle #define DEBUG_MODULE "TDOA3" #include "debug.h" #include "cfassert.h" -#include "log.h" -#include "param.h" // Positions for sent LPP packets #define LPS_TDOA3_TYPE 0 @@ -326,23 +324,3 @@ uwbAlgorithm_t uwbTdoa3TagAlgorithm = { .getAnchorIdList = getAnchorIdList, .getActiveAnchorIdList = getActiveAnchorIdList, }; - - -LOG_GROUP_START(tdoa3) -STATS_CNT_RATE_LOG_ADD(stRx, &tdoaEngineState.stats.packetsReceived) -STATS_CNT_RATE_LOG_ADD(stEst, &tdoaEngineState.stats.packetsToEstimator) -STATS_CNT_RATE_LOG_ADD(stTime, &tdoaEngineState.stats.timeIsGood) -STATS_CNT_RATE_LOG_ADD(stFound, &tdoaEngineState.stats.suitableDataFound) -STATS_CNT_RATE_LOG_ADD(stCc, &tdoaEngineState.stats.clockCorrection) -STATS_CNT_RATE_LOG_ADD(stHit, &tdoaEngineState.stats.contextHitCount) -STATS_CNT_RATE_LOG_ADD(stMiss, &tdoaEngineState.stats.contextMissCount) - -LOG_ADD(LOG_FLOAT, cc, &tdoaEngineState.stats.clockCorrection) -LOG_ADD(LOG_UINT16, tof, &tdoaEngineState.stats.tof) -LOG_ADD(LOG_FLOAT, tdoa, &tdoaEngineState.stats.tdoa) -LOG_GROUP_STOP(tdoa3) - -PARAM_GROUP_START(tdoa3) -PARAM_ADD(PARAM_UINT8, logId, &tdoaEngineState.stats.newAnchorId) -PARAM_ADD(PARAM_UINT8, logOthrId, &tdoaEngineState.stats.newRemoteAnchorId) -PARAM_GROUP_STOP(tdoa3) diff --git a/src/modules/src/tdoaEngineInstance.c b/src/modules/src/tdoaEngineInstance.c index 6346c0a927..8972ecd879 100644 --- a/src/modules/src/tdoaEngineInstance.c +++ b/src/modules/src/tdoaEngineInstance.c @@ -26,5 +26,27 @@ */ #include "tdoaEngineInstance.h" +#include "log.h" +#include "param.h" tdoaEngineState_t tdoaEngineState; + +LOG_GROUP_START(tdoaEngine) +STATS_CNT_RATE_LOG_ADD(stRx, &tdoaEngineState.stats.packetsReceived) +STATS_CNT_RATE_LOG_ADD(stEst, &tdoaEngineState.stats.packetsToEstimator) +STATS_CNT_RATE_LOG_ADD(stTime, &tdoaEngineState.stats.timeIsGood) +STATS_CNT_RATE_LOG_ADD(stFound, &tdoaEngineState.stats.suitableDataFound) +STATS_CNT_RATE_LOG_ADD(stCc, &tdoaEngineState.stats.clockCorrection) +STATS_CNT_RATE_LOG_ADD(stHit, &tdoaEngineState.stats.contextHitCount) +STATS_CNT_RATE_LOG_ADD(stMiss, &tdoaEngineState.stats.contextMissCount) + +LOG_ADD(LOG_FLOAT, cc, &tdoaEngineState.stats.clockCorrection) +LOG_ADD(LOG_UINT16, tof, &tdoaEngineState.stats.tof) +LOG_ADD(LOG_FLOAT, tdoa, &tdoaEngineState.stats.tdoa) +LOG_GROUP_STOP(tdoaEngine) + + +PARAM_GROUP_START(tdoaEngine) +PARAM_ADD(PARAM_UINT8, logId, &tdoaEngineState.stats.newAnchorId) +PARAM_ADD(PARAM_UINT8, logOthrId, &tdoaEngineState.stats.newRemoteAnchorId) +PARAM_GROUP_STOP(tdoaEngine)