Add millis helper macros

This commit is contained in:
Scott Lahteine
2020-04-03 19:49:45 -05:00
parent 723d4d6f61
commit 0e06aaa2bc
10 changed files with 26 additions and 23 deletions

View File

@@ -227,7 +227,7 @@ bool wait_for_heatup = true;
// Inactivity shutdown
millis_t max_inactive_time, // = 0
stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
stepper_inactive_time = SEC_TO_MS(DEFAULT_STEPPER_DEACTIVE_TIME);
#if PIN_EXISTS(CHDK)
extern millis_t chdk_timeout;
@@ -543,7 +543,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP
&& ELAPSED(ms, gcode.previous_move_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
&& ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
&& !planner.has_blocks_queued()
) {
#if ENABLED(SWITCHING_EXTRUDER)