Skip to content

Commit

Permalink
Revert "Proposed 'early_safe_delay'"
Browse files Browse the repository at this point in the history
This reverts commit ab9b91d.
  • Loading branch information
thinkyhead committed Apr 20, 2021
1 parent d4ad933 commit 8c79e82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 0 additions & 12 deletions Marlin/src/core/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ void safe_delay(millis_t ms) {
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
}

#if ENABLED(MARLIN_DEV_MODE)
void early_safe_delay(millis_t ms) {
while (ms > 50) {
ms -= 50;
delay(50);
watchdog_refresh();
}
delay(ms);
watchdog_refresh();
}
#endif

// A delay to provide brittle hosts time to receive bytes
#if ENABLED(SERIAL_OVERRUN_PROTECTION)

Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/lcd/dogm/marlinui_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ bool MarlinUI::detected() { return true; }
#endif
u8g.firstPage();
do { draw_custom_bootscreen(f); } while (u8g.nextPage());
if (frame_time) early_safe_delay(frame_time);
if (frame_time) safe_delay(frame_time);
}

#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#endif
#if CUSTOM_BOOTSCREEN_TIMEOUT
early_safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
#endif
}
#endif // SHOW_CUSTOM_BOOTSCREEN
Expand Down Expand Up @@ -225,7 +225,7 @@ bool MarlinUI::detected() { return true; }
constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
draw_bootscreen_bmp((uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]));
if (frame_time) early_safe_delay(frame_time);
if (frame_time) safe_delay(frame_time);
}
#endif
}
Expand Down

0 comments on commit 8c79e82

Please sign in to comment.