}
}
+ // save current actuator position so we can report how far we moved
+ ActuatorCoordinates start_pos{
+ THEKERNEL->robot->actuators[X_AXIS]->get_current_position(),
+ THEKERNEL->robot->actuators[Y_AXIS]->get_current_position(),
+ THEKERNEL->robot->actuators[Z_AXIS]->get_current_position()
+ };
+
// Enable the motors
THEKERNEL->stepper->turn_enable_pins_on();
}
// set the last probe position to the actuator units moved during this home
- THEKERNEL->robot->set_last_probe_position(std::make_tuple(STEPPER[0]->get_stepped()/STEPS_PER_MM(0), STEPPER[1]->get_stepped()/STEPS_PER_MM(1), STEPPER[2]->get_stepped()/STEPS_PER_MM(2), 0));
+ THEKERNEL->robot->set_last_probe_position(
+ std::make_tuple(
+ start_pos[0]-THEKERNEL->robot->actuators[0]->get_current_position(),
+ start_pos[1]-THEKERNEL->robot->actuators[1]->get_current_position(),
+ start_pos[2]-THEKERNEL->robot->actuators[2]->get_current_position(),
+ 0));
if(home_all) {
// Here's where we would have been if the endstops were perfectly trimmed
// first wait for an empty queue i.e. no moves left
THEKERNEL->conveyor->wait_for_empty_queue();
+ // turn off any compensation transform
+ auto savect= THEKERNEL->robot->compensationTransform;
+ THEKERNEL->robot->compensationTransform= nullptr;
+
if(gcode->has_letter('X')) {
// probe in the X axis
probe_XY(gcode, X_AXIS);
gcode->stream->printf("error:at least one of X Y or Z must be specified\n");
}
+
+ // restore compensationTransform
+ THEKERNEL->robot->compensationTransform= savect;
+
return;
} else if(gcode->has_m) {