diff --git a/g2core/cycle_feedhold.cpp b/g2core/cycle_feedhold.cpp index ed0b7ab0..ccc0e563 100644 --- a/g2core/cycle_feedhold.cpp +++ b/g2core/cycle_feedhold.cpp @@ -468,10 +468,10 @@ static stat_t _run_job_kill_final() coolant_control_immediate(COOLANT_OFF, COOLANT_BOTH); // stop coolant spindle_control_immediate(SPINDLE_OFF); // stop spindle - cm->hold_state = FEEDHOLD_OFF; - cm->machine_state = MACHINE_ALARM; - cm->cycle_type = CYCLE_NONE; cm_set_motion_state(MOTION_STOP); // set to stop and set the active model + cm->hold_state = FEEDHOLD_OFF; + cm->cycle_type = CYCLE_NONE; + cm->machine_state = MACHINE_ALARM; rpt_exception(STAT_KILL_JOB, "Job killed by ^d"); sr_request_status_report(SR_REQUEST_IMMEDIATE); diff --git a/g2core/plan_exec.cpp b/g2core/plan_exec.cpp index 990a1793..9cb7fb66 100644 --- a/g2core/plan_exec.cpp +++ b/g2core/plan_exec.cpp @@ -1031,12 +1031,10 @@ static stat_t _exec_aline_feedhold(mpBuf_t *bf) if (cm->hold_state == FEEDHOLD_MOTION_STOPPING) { if (mp_runtime_is_idle()) { // wait for steppers to actually finish mp_zero_segment_velocity(); // finalize velocity for reporting purposes -// cm_set_motion_state(MOTION_STOP); // we just stopped it +++++ test this cm->hold_state = FEEDHOLD_MOTION_STOPPED; // If in a p2 hold, exit the p2 hold immediately set up a flush of the p2 planner queue if (cm == &cm2) { -// cm->hold_type = FEEDHOLD_TYPE_SYNC; // force to a sync hold cm->hold_state = FEEDHOLD_HOLD; return (STAT_OK); // will end this exec_aline() with no more movement }