From f4e2de4608694cf85b92729a776e7f996c1d911c Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Fri, 9 Nov 2018 14:13:28 +1100 Subject: [PATCH] Fix not resetting average calculation Should help with #366 --- workspace/TS100/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 86af0f2d..415f8214 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -1036,7 +1036,7 @@ void startMOVTask(void const *argument __unused) { datay[currentPointer] = (int32_t) ty; dataz[currentPointer] = (int32_t) tz; currentPointer = (currentPointer + 1) % MOVFilter; - + avgx = avgy = avgz = 0; // calculate averages for (uint8_t i = 0; i < MOVFilter; i++) { avgx += datax[i];