|
@@ -1310,10 +1310,17 @@ void setup()
|
|
setup_photpin();
|
|
setup_photpin();
|
|
|
|
|
|
servo_init();
|
|
servo_init();
|
|
|
|
+
|
|
// Reset the machine correction matrix.
|
|
// Reset the machine correction matrix.
|
|
// It does not make sense to load the correction matrix until the machine is homed.
|
|
// It does not make sense to load the correction matrix until the machine is homed.
|
|
world2machine_reset();
|
|
world2machine_reset();
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ // Initialize current_position accounting for software endstops to
|
|
|
|
+ // avoid unexpected initial shifts on the first move
|
|
|
|
+ clamp_to_software_endstops(current_position);
|
|
|
|
+ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS],
|
|
|
|
+ current_position[Z_AXIS], current_position[E_AXIS]);
|
|
|
|
+
|
|
#ifdef FILAMENT_SENSOR
|
|
#ifdef FILAMENT_SENSOR
|
|
fsensor_init();
|
|
fsensor_init();
|
|
#endif //FILAMENT_SENSOR
|
|
#endif //FILAMENT_SENSOR
|