We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cf6455 commit a434637Copy full SHA for a434637
1 file changed
src/components/motion/MotionController.cpp
@@ -50,7 +50,6 @@ bool MotionController::Should_RaiseWake(bool isSleeping) {
50
}
51
52
bool MotionController::ShouldShakeWake(uint16_t thresh) {
53
- bool wake = false;
54
auto diff = xTaskGetTickCount() - lastShakeTime;
55
lastShakeTime = xTaskGetTickCount();
56
/* Currently Polling at 10hz, If this ever goes faster scalar and EMA might need adjusting */
@@ -59,10 +58,7 @@ bool MotionController::ShouldShakeWake(uint16_t thresh) {
59
58
// implemented without floats as .25Alpha
60
accumulatedSpeed = (speed / 5) + ((accumulatedSpeed / 5) * 4);
61
62
- if (accumulatedSpeed > thresh) {
63
- wake = true;
64
- }
65
- return wake;
+ return accumulatedSpeed > thresh;
66
67
68
void MotionController::IsSensorOk(bool isOk) {
0 commit comments