Move dwell to gcode
This commit is contained in:
@@ -163,7 +163,6 @@ volatile bool wait_for_heatup = true;
|
||||
#endif
|
||||
|
||||
// Inactivity shutdown
|
||||
millis_t previous_cmd_ms = 0;
|
||||
static millis_t max_inactive_time = 0;
|
||||
static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
|
||||
|
||||
@@ -366,16 +365,6 @@ void suicide() {
|
||||
***************** GCode Handlers *****************
|
||||
**************************************************/
|
||||
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
#include "gcode/motion/G2_G3.h"
|
||||
#endif
|
||||
|
||||
void dwell(millis_t time) {
|
||||
gcode.refresh_cmd_timeout();
|
||||
time += previous_cmd_ms;
|
||||
while (PENDING(millis(), time)) idle();
|
||||
}
|
||||
|
||||
#include "gcode/motion/G4.h"
|
||||
|
||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
||||
@@ -882,7 +871,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
||||
|
||||
const millis_t ms = millis();
|
||||
|
||||
if (max_inactive_time && ELAPSED(ms, previous_cmd_ms + max_inactive_time)) {
|
||||
if (max_inactive_time && ELAPSED(ms, gcode.previous_cmd_ms + max_inactive_time)) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr);
|
||||
kill(PSTR(MSG_KILLED));
|
||||
@@ -895,7 +884,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
||||
#define MOVE_AWAY_TEST true
|
||||
#endif
|
||||
|
||||
if (MOVE_AWAY_TEST && stepper_inactive_time && ELAPSED(ms, previous_cmd_ms + stepper_inactive_time)
|
||||
if (MOVE_AWAY_TEST && stepper_inactive_time && ELAPSED(ms, gcode.previous_cmd_ms + stepper_inactive_time)
|
||||
&& !ignore_stepper_queue && !planner.blocks_queued()) {
|
||||
#if ENABLED(DISABLE_INACTIVE_X)
|
||||
disable_X();
|
||||
@@ -965,7 +954,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
|
||||
if (ELAPSED(ms, previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
|
||||
if (ELAPSED(ms, gcode.previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
|
||||
&& thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
const bool oldstatus = E0_ENABLE_READ;
|
||||
|
Reference in New Issue
Block a user