Skip to content

Commit 4d93ae6

Browse files
committed
MotionController: Remove IsOk variable
We should be able to assume MotionController is safe to use.
1 parent 348d3de commit 4d93ae6

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

src/components/motion/MotionController.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ namespace Pinetime {
5050
return accumulatedSpeed;
5151
}
5252

53-
void IsSensorOk(bool isOk) {
54-
isSensorOk = isOk;
55-
}
56-
57-
bool IsSensorOk() const {
58-
return isSensorOk;
59-
}
60-
6153
DeviceTypes DeviceType() const {
6254
return deviceType;
6355
}
@@ -83,7 +75,6 @@ namespace Pinetime {
8375
int16_t z = 0;
8476
int32_t accumulatedSpeed = 0;
8577

86-
bool isSensorOk = false;
8778
DeviceTypes deviceType = DeviceTypes::Unknown;
8879
Pinetime::Controllers::MotionService* service = nullptr;
8980
};

src/systemtask/SystemTask.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ void SystemTask::UpdateMotion() {
435435

436436
auto motionValues = motionSensor.Process();
437437

438-
motionController.IsSensorOk(motionSensor.IsOk());
439438
motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps);
440439

441440
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {

0 commit comments

Comments
 (0)