Add startup lockout to movement checks

This commit is contained in:
Ben V. Brown
2020-12-30 19:52:34 +11:00
parent 222a5cfab9
commit 7f81fbbe7a

View File

@@ -306,9 +306,12 @@ static int gui_SolderingSleepingMode(bool stayOff) {
for (;;) { for (;;) {
// user moved or pressed a button, go back to soldering // user moved or pressed a button, go back to soldering
//If in the first two seconds we disable this to let accelerometer warm up
if (xTaskGetTickCount() > TICKS_SECOND * 2) {
if (!shouldBeSleeping()) { if (!shouldBeSleeping()) {
return 0; return 0;
} }
}
#ifdef POW_DC #ifdef POW_DC
if (checkVoltageForExit()) if (checkVoltageForExit())