MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / checkAutoPowerOff

Method checkAutoPowerOff

Marlin/src/feature/power.cpp:186–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 }
185
186 void Power::checkAutoPowerOff() {
187 if (TERN1(POWER_OFF_TIMER, !power_off_time) && TERN1(POWER_OFF_WAIT_FOR_COOLDOWN, !power_off_on_cooldown)) return;
188 if (TERN0(POWER_OFF_WAIT_FOR_COOLDOWN, power_off_on_cooldown && is_cooling_needed())) return;
189 if (TERN0(POWER_OFF_TIMER, power_off_time && PENDING(millis(), power_off_time))) return;
190 power_off();
191 }
192
193#endif // POWER_OFF_TIMER || POWER_OFF_WAIT_FOR_COOLDOWN
194

Callers 1

loopFunction · 0.80

Calls 2

power_offFunction · 0.85
millisFunction · 0.50

Tested by

no test coverage detected