Przeglądaj źródła

Drop early_safe_delay

Scott Lahteine 4 lat temu
rodzic
commit
9dd884a324

+ 0
- 12
Marlin/src/core/utility.cpp Wyświetl plik

35
   thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
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
 // A delay to provide brittle hosts time to receive bytes
38
 // A delay to provide brittle hosts time to receive bytes
51
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
39
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
52
 
40
 

+ 0
- 5
Marlin/src/core/utility.h Wyświetl plik

26
 #include "../core/millis_t.h"
26
 #include "../core/millis_t.h"
27
 
27
 
28
 void safe_delay(millis_t ms);           // Delay ensuring that temperatures are updated and the watchdog is kept alive.
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
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
30
 #if ENABLED(SERIAL_OVERRUN_PROTECTION)
36
   void serial_delay(const millis_t ms);
31
   void serial_delay(const millis_t ms);

+ 4
- 4
Marlin/src/lcd/dogm/marlinui_DOGM.cpp Wyświetl plik

160
           #endif
160
           #endif
161
           u8g.firstPage();
161
           u8g.firstPage();
162
           do { draw_custom_bootscreen(f); } while (u8g.nextPage());
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
       #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
166
       #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
167
         #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
167
         #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
168
       #endif
168
       #endif
169
       #if CUSTOM_BOOTSCREEN_TIMEOUT
169
       #if CUSTOM_BOOTSCREEN_TIMEOUT
170
-        early_safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
170
+        safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
171
       #endif
171
       #endif
172
     }
172
     }
173
   #endif // SHOW_CUSTOM_BOOTSCREEN
173
   #endif // SHOW_CUSTOM_BOOTSCREEN
226
       constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
226
       constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
227
       LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
227
       LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
228
         draw_bootscreen_bmp((uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]));
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
     #endif
231
     #endif
232
   }
232
   }
235
   void MarlinUI::show_marlin_bootscreen() {
235
   void MarlinUI::show_marlin_bootscreen() {
236
     for (uint8_t q = bootscreen_pages; q--;) {
236
     for (uint8_t q = bootscreen_pages; q--;) {
237
       draw_marlin_bootscreen(q == 0);
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
 

Ładowanie…
Anuluj
Zapisz