From a65f173e3c63730c7db3c29bf44e538773971dc7 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Sat, 23 Oct 2021 13:41:10 -0400 Subject: Renamed confusing variables and general cleanup --- src/components/motion/MotionController.cpp | 2 +- src/components/motion/MotionController.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/components/motion') diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp index 59114f4c..f2b36ad0 100644 --- a/src/components/motion/MotionController.cpp +++ b/src/components/motion/MotionController.cpp @@ -14,7 +14,7 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps) this->x = x; this->y = y; this->z = z; - deltaSteps = nbSteps - this->nbSteps; + int32_t deltaSteps = nbSteps - this->nbSteps; this->nbSteps = nbSteps; if(deltaSteps > 0){ currentTripSteps += deltaSteps; diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index 17bdc52e..3de03d19 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -51,7 +51,6 @@ namespace Pinetime { private: uint32_t nbSteps; - int32_t deltaSteps = 0; uint32_t currentTripSteps = 0; int16_t x; int16_t y; -- cgit v1.2.3-70-g09d2