optimisation: used expired() instead of elapsed()
If the timer is expired, then the timer is stopped. This is OK since we are starting the timer again anyway Change in memory: Flash: -14 bytes SRAM: 0 bytes
This commit is contained in:
parent
09952db139
commit
ae31c0ec31
|
|
@ -9600,7 +9600,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
|
|||
get_command();
|
||||
}
|
||||
|
||||
if (blocks_queued() && GetPrinterState() == PrinterState::IsHostPrinting && usb_timer.elapsed() > ((USB_TIMER_TIMEOUT) / 2))
|
||||
if (blocks_queued() && GetPrinterState() == PrinterState::IsHostPrinting && usb_timer.expired((USB_TIMER_TIMEOUT) / 2))
|
||||
{
|
||||
// Handle the case where planned moves may take a longer time to execute than the USB timer period.
|
||||
// An example is the toolchange unload sequence generated by PrusaSlicer with default settings.
|
||||
|
|
|
|||
Loading…
Reference in New Issue