Handle return code from BMA driver, and set a flag is the initialization fails. This allows to boot InfiniTime even if the device cannot initialize.
This commit is contained in:
@@ -31,3 +31,6 @@ bool MotionController::ShouldWakeUp(bool isSleeping) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void MotionController::IsSensorOk(bool isOk) {
|
||||
isSensorOk = isOk;
|
||||
}
|
||||
|
@@ -14,13 +14,16 @@ namespace Pinetime {
|
||||
uint32_t NbSteps() const { return nbSteps; }
|
||||
bool ShouldWakeUp(bool isSleeping);
|
||||
|
||||
private:
|
||||
void IsSensorOk(bool isOk);
|
||||
bool IsSensorOk() const { return isSensorOk; }
|
||||
|
||||
private:
|
||||
uint32_t nbSteps;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t z;
|
||||
int16_t lastYForWakeUp = 0;
|
||||
|
||||
bool isSensorOk = false;
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user