From 4d93ae6d27a94fe2a3c03b8f09bff2e23da30e12 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Wed, 5 Apr 2023 21:50:38 +0300 Subject: [PATCH] MotionController: Remove IsOk variable We should be able to assume MotionController is safe to use. --- src/components/motion/MotionController.h | 9 --------- src/systemtask/SystemTask.cpp | 1 - 2 files changed, 10 deletions(-) diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index eb8d04aa..87dbcd1f 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -50,14 +50,6 @@ namespace Pinetime { return accumulatedSpeed; } - void IsSensorOk(bool isOk) { - isSensorOk = isOk; - } - - bool IsSensorOk() const { - return isSensorOk; - } - DeviceTypes DeviceType() const { return deviceType; } @@ -83,7 +75,6 @@ namespace Pinetime { int16_t z = 0; int32_t accumulatedSpeed = 0; - bool isSensorOk = false; DeviceTypes deviceType = DeviceTypes::Unknown; Pinetime::Controllers::MotionService* service = nullptr; }; diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 539ff895..9dac95ee 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -435,7 +435,6 @@ void SystemTask::UpdateMotion() { auto motionValues = motionSensor.Process(); - motionController.IsSensorOk(motionSensor.IsOk()); motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps); if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {