Browse Source

Drop early_safe_delay

Scott Lahteine 3 years ago
parent
commit
9dd884a324
3 changed files with 4 additions and 21 deletions
  1. 0
    12
      Marlin/src/core/utility.cpp
  2. 0
    5
      Marlin/src/core/utility.h
  3. 4
    4
      Marlin/src/lcd/dogm/marlinui_DOGM.cpp

+ 0
- 12
Marlin/src/core/utility.cpp View File

@@ -35,18 +35,6 @@ void safe_delay(millis_t ms) {
35 35
   thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
36 36
 }
37 37
 
38
-#if ENABLED(MARLIN_DEV_MODE)
39
-  void early_safe_delay(millis_t ms) {
40
-    while (ms > 50) {
41
-      ms -= 50;
42
-      delay(50);
43
-      watchdog_refresh();
44
-    }
45
-    delay(ms);
46
-    watchdog_refresh();
47
-  }
48
-#endif
49
-
50 38
 // A delay to provide brittle hosts time to receive bytes
51 39
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
52 40
 

+ 0
- 5
Marlin/src/core/utility.h View File

@@ -26,11 +26,6 @@
26 26
 #include "../core/millis_t.h"
27 27
 
28 28
 void safe_delay(millis_t ms);           // Delay ensuring that temperatures are updated and the watchdog is kept alive.
29
-#if ENABLED(MARLIN_DEV_MODE)
30
-  void early_safe_delay(millis_t ms);   // Delay ensuring that the watchdog is kept alive. Can be used before the Temperature ISR starts.
31
-#else
32
-  inline void early_safe_delay(millis_t ms) { safe_delay(ms); }
33
-#endif
34 29
 
35 30
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
36 31
   void serial_delay(const millis_t ms);

+ 4
- 4
Marlin/src/lcd/dogm/marlinui_DOGM.cpp View File

@@ -160,14 +160,14 @@ bool MarlinUI::detected() { return true; }
160 160
           #endif
161 161
           u8g.firstPage();
162 162
           do { draw_custom_bootscreen(f); } while (u8g.nextPage());
163
-          if (frame_time) early_safe_delay(frame_time);
163
+          if (frame_time) safe_delay(frame_time);
164 164
         }
165 165
 
166 166
       #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
167 167
         #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
168 168
       #endif
169 169
       #if CUSTOM_BOOTSCREEN_TIMEOUT
170
-        early_safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
170
+        safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
171 171
       #endif
172 172
     }
173 173
   #endif // SHOW_CUSTOM_BOOTSCREEN
@@ -226,7 +226,7 @@ bool MarlinUI::detected() { return true; }
226 226
       constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
227 227
       LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
228 228
         draw_bootscreen_bmp((uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]));
229
-        if (frame_time) early_safe_delay(frame_time);
229
+        if (frame_time) safe_delay(frame_time);
230 230
       }
231 231
     #endif
232 232
   }
@@ -235,7 +235,7 @@ bool MarlinUI::detected() { return true; }
235 235
   void MarlinUI::show_marlin_bootscreen() {
236 236
     for (uint8_t q = bootscreen_pages; q--;) {
237 237
       draw_marlin_bootscreen(q == 0);
238
-      if (q) early_safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages);
238
+      if (q) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages);
239 239
     }
240 240
   }
241 241
 

Loading…
Cancel
Save