From f4aba996244604afd27cfcf6d5f2654aab597f56 Mon Sep 17 00:00:00 2001 From: Markus Towara Date: Fri, 17 Jul 2020 19:33:45 +0200 Subject: [PATCH] Use safe_delay for PSU_POWERUP_DELAY (#18680) Co-authored-by: Scott Lahteine --- Marlin/src/feature/power.cpp | 4 ++-- Marlin/src/gcode/control/M80_M81.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 5df016a2d2..4ba3e30a24 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -105,9 +105,9 @@ void Power::power_on() { lastPowerOn = millis(); if (!powersupply_on) { PSU_PIN_ON(); - delay(PSU_POWERUP_DELAY); + safe_delay(PSU_POWERUP_DELAY); restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY)); + TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); } } diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index 6ba0949027..98efcce04d 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -72,9 +72,9 @@ #endif #if DISABLED(AUTO_POWER_CONTROL) - delay(PSU_POWERUP_DELAY); + safe_delay(PSU_POWERUP_DELAY); restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, delay(PSU_POWERUP_DELAY)); + TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); #endif TERN_(HAS_LCD_MENU, ui.reset_status());