From 86d2576d3e76008580a7255114ba29c1960632f6 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 28 Nov 2016 12:00:56 -0800 Subject: [PATCH] Fix types on touch Filter accumulator/value. --- firmware/application/touch.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/application/touch.hpp b/firmware/application/touch.hpp index 549d3809b..ebea3c92d 100644 --- a/firmware/application/touch.hpp +++ b/firmware/application/touch.hpp @@ -171,7 +171,7 @@ public: history_history = (history_history << 1) | 1U; } - uint32_t value() const { + int32_t value() const { return accumulator / N; } @@ -192,7 +192,7 @@ private: std::array history { }; uint32_t history_history { 0 }; - uint32_t accumulator { 0 }; + int32_t accumulator { 0 }; size_t n { 0 }; bool history_valid() const {