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 003ce25 commit ec518e6Copy full SHA for ec518e6
Marlin/src/feature/power.cpp
@@ -105,12 +105,12 @@ bool Power::is_power_needed() {
105
106
void Power::check() {
107
static millis_t nextPowerCheck = 0;
108
- millis_t ms = millis();
109
- if (ELAPSED(ms, nextPowerCheck)) {
110
- nextPowerCheck = ms + 2500UL;
+ millis_t now = millis();
+ if (ELAPSED(now, nextPowerCheck)) {
+ nextPowerCheck = now + 2500UL;
111
if (is_power_needed())
112
power_on();
113
- else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
+ else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
114
power_off();
115
}
116
0 commit comments