Skip to content

Commit

Permalink
#556 Moved log and params from tdoa3 to todo engine instance. Compati…
Browse files Browse the repository at this point in the history
…bility break: log and param group names are changed from "tdoa3" to "todaEngine".
  • Loading branch information
krichardsson committed Feb 21, 2020
1 parent 831eb98 commit b6a3605
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/deck/drivers/src/lpsTdoa3Tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
22 changes: 22 additions & 0 deletions src/modules/src/tdoaEngineInstance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit b6a3605

Please sign in to comment.