static void _probe_restore_settings() { mp_flush_planner(); // if (cm.hold_state == FEEDHOLD_HOLD); // cm_end_hold(); cm_end_hold(); // ends hold if on is in effect gpio_set_probing_mode(pb.probe_input, false); // restore axis jerk for (uint8_t axis=0; axis<AXES; axis++) { cm.a[axis].jerk_max = pb.saved_jerk[axis]; } // restore coordinate system and distance mode cm_set_coord_system(pb.saved_coord_system); cm_set_distance_mode(pb.saved_distance_mode); // update the model with actual position cm_set_motion_mode(MODEL, MOTION_MODE_CANCEL_MOTION_MODE); cm_canned_cycle_end(); }
static void _probe_restore_settings() { // flush queue and end feedhold (if any) cm_queue_flush(); // set input back to normal operation gpio_set_probing_mode(pb.probe_input, false); // restore axis jerk for (uint8_t axis=0; axis<AXES; axis++) { cm.a[axis].jerk_max = pb.saved_jerk[axis]; } // restore coordinate system and distance mode cm_set_coord_system(pb.saved_coord_system); cm_set_distance_mode(pb.saved_distance_mode); // restart spindle if it was paused cm_spindle_resume(spindle.dwell_seconds); // cancel the feed modes used during probing cm_set_motion_mode(MODEL, MOTION_MODE_CANCEL_MOTION_MODE); cm_canned_cycle_end(); }