MotionController: Remove IsOk variable
We should be able to assume MotionController is safe to use.
This commit is contained in:
parent
348d3de60b
commit
4d93ae6d27
|
@ -50,14 +50,6 @@ namespace Pinetime {
|
||||||
return accumulatedSpeed;
|
return accumulatedSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsSensorOk(bool isOk) {
|
|
||||||
isSensorOk = isOk;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsSensorOk() const {
|
|
||||||
return isSensorOk;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceTypes DeviceType() const {
|
DeviceTypes DeviceType() const {
|
||||||
return deviceType;
|
return deviceType;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +75,6 @@ namespace Pinetime {
|
||||||
int16_t z = 0;
|
int16_t z = 0;
|
||||||
int32_t accumulatedSpeed = 0;
|
int32_t accumulatedSpeed = 0;
|
||||||
|
|
||||||
bool isSensorOk = false;
|
|
||||||
DeviceTypes deviceType = DeviceTypes::Unknown;
|
DeviceTypes deviceType = DeviceTypes::Unknown;
|
||||||
Pinetime::Controllers::MotionService* service = nullptr;
|
Pinetime::Controllers::MotionService* service = nullptr;
|
||||||
};
|
};
|
||||||
|
|
|
@ -435,7 +435,6 @@ void SystemTask::UpdateMotion() {
|
||||||
|
|
||||||
auto motionValues = motionSensor.Process();
|
auto motionValues = motionSensor.Process();
|
||||||
|
|
||||||
motionController.IsSensorOk(motionSensor.IsOk());
|
|
||||||
motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps);
|
motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps);
|
||||||
|
|
||||||
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {
|
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {
|
||||||
|
|
Loading…
Reference in a new issue