mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Add startup lockout to movement checks
This commit is contained in:
@@ -306,8 +306,11 @@ 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 (!shouldBeSleeping()) {
|
//If in the first two seconds we disable this to let accelerometer warm up
|
||||||
return 0;
|
if (xTaskGetTickCount() > TICKS_SECOND * 2) {
|
||||||
|
if (!shouldBeSleeping()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POW_DC
|
#ifdef POW_DC
|
||||||
@@ -708,11 +711,11 @@ void showDebugMenu(void) {
|
|||||||
//We are not powered via DC, so want to display the appropriate state for PD or QC
|
//We are not powered via DC, so want to display the appropriate state for PD or QC
|
||||||
bool poweredbyPD = false;
|
bool poweredbyPD = false;
|
||||||
#ifdef POW_PD
|
#ifdef POW_PD
|
||||||
if (usb_pd_detect()){
|
if (usb_pd_detect()) {
|
||||||
//We are PD capable
|
//We are PD capable
|
||||||
if (PolicyEngine::pdHasNegotiated()) {
|
if (PolicyEngine::pdHasNegotiated()) {
|
||||||
//We are powered via PD
|
//We are powered via PD
|
||||||
poweredbyPD=true;
|
poweredbyPD = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user