summaryrefslogtreecommitdiff
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-04-02 14:56:14 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-04-04 13:56:11 (GMT)
commit52a90288fd2b744b68d584db316fcf3fede84262 (patch)
treec349c0bbc00c88d1c271604ba84f5e528e093330 /src/components/motion/MotionController.h
parentc7cc47ae306b8012c196587f156519b0773aef93 (diff)
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.
Diffstat (limited to 'src/components/motion/MotionController.h')
-rw-r--r--src/components/motion/MotionController.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index dbbbf91..5881997 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -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;
};
}
} \ No newline at end of file