소스 검색

🎨 Small tweak, ms => now

Scott Lahteine 4 년 전
부모
커밋
a789cb4fb6
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4
    4
      Marlin/src/feature/power.cpp

+ 4
- 4
Marlin/src/feature/power.cpp 파일 보기

@@ -109,12 +109,12 @@ bool Power::is_power_needed() {
109 109
 
110 110
 void Power::check() {
111 111
   static millis_t nextPowerCheck = 0;
112
-  millis_t ms = millis();
113
-  if (ELAPSED(ms, nextPowerCheck)) {
114
-    nextPowerCheck = ms + 2500UL;
112
+  millis_t now = millis();
113
+  if (ELAPSED(now, nextPowerCheck)) {
114
+    nextPowerCheck = now + 2500UL;
115 115
     if (is_power_needed())
116 116
       power_on();
117
-    else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
117
+    else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
118 118
       power_off();
119 119
   }
120 120
 }

Loading…
취소
저장