|
|
@ -117,6 +117,21 @@ bool MotionController::ShouldShakeWake(uint16_t thresh) {
|
|
|
|
// return accumulatedSpeed > thresh;
|
|
|
|
// return accumulatedSpeed > thresh;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool MotionController::ShouldLowerSleep() const {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// if (stats.yMean < 724 || DegreesRolled(stats.yMean, stats.zMean, stats.prevYMean, stats.prevZMean) < 30) {
|
|
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// for (uint8_t i = AccelStats::numHistory + 1; i < yHistory.Size(); i++) {
|
|
|
|
|
|
|
|
// if (yHistory[i] < 265) {
|
|
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) {
|
|
|
|
void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) {
|
|
|
|
switch (types) {
|
|
|
|
switch (types) {
|
|
|
|
case Drivers::Bma421::DeviceTypes::BMA421:
|
|
|
|
case Drivers::Bma421::DeviceTypes::BMA421:
|
|
|
|