mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-20 21:27:53 -06:00
sched: Don't shutdown on a "timer in the past" if already shutdown
A shutdown will not help if the mcu is already in a shutdown state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3b9b4e4d6f
commit
744c6d114e
4 changed files with 5 additions and 6 deletions
|
@ -195,7 +195,7 @@ ISR(TIMER1_COMPA_vect)
|
|||
irq_disable();
|
||||
uint16_t now = timer_get();
|
||||
if ((int16_t)(next - now) < (int16_t)(-timer_from_us(1000)))
|
||||
shutdown("Rescheduled timer in the past");
|
||||
try_shutdown("Rescheduled timer in the past");
|
||||
if (sched_tasks_busy()) {
|
||||
timer_repeat_set(now + TIMER_REPEAT_TICKS);
|
||||
next = now + TIMER_DEFER_REPEAT_TICKS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue