|
@@ -1303,18 +1303,33 @@ inline void set_homing_bump_feedrate(AxisEnum axis) {
|
1303
|
1303
|
}
|
1304
|
1304
|
feedrate = homing_feedrate[axis] / hbd;
|
1305
|
1305
|
}
|
|
1306
|
+//
|
|
1307
|
+// line_to_current_position
|
|
1308
|
+// Move the planner to the current position from wherever it last moved
|
|
1309
|
+// (or from wherever it has been told it is located).
|
|
1310
|
+//
|
1306
|
1311
|
inline void line_to_current_position() {
|
1307
|
1312
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate / 60, active_extruder);
|
1308
|
1313
|
}
|
1309
|
1314
|
inline void line_to_z(float zPosition) {
|
1310
|
1315
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate / 60, active_extruder);
|
1311
|
1316
|
}
|
|
1317
|
+//
|
|
1318
|
+// line_to_destination
|
|
1319
|
+// Move the planner, not necessarily synced with current_position
|
|
1320
|
+//
|
1312
|
1321
|
inline void line_to_destination(float mm_m) {
|
1313
|
1322
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m / 60, active_extruder);
|
1314
|
1323
|
}
|
1315
|
1324
|
inline void line_to_destination() {
|
1316
|
1325
|
line_to_destination(feedrate);
|
1317
|
1326
|
}
|
|
1327
|
+/**
|
|
1328
|
+ * sync_plan_position
|
|
1329
|
+ * Set planner / stepper positions to the cartesian current_position.
|
|
1330
|
+ * The stepper code translates these coordinates into step units.
|
|
1331
|
+ * Allows translation between steps and units (mm) for cartesian & core robots
|
|
1332
|
+ */
|
1318
|
1333
|
inline void sync_plan_position() {
|
1319
|
1334
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1320
|
1335
|
if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);
|
|
@@ -3116,8 +3131,8 @@ inline void gcode_G28() {
|
3116
|
3131
|
#if ENABLED(DELTA)
|
3117
|
3132
|
delta_grid_spacing[0] = xGridSpacing;
|
3118
|
3133
|
delta_grid_spacing[1] = yGridSpacing;
|
3119
|
|
- float z_offset = zprobe_zoffset;
|
3120
|
|
- if (code_seen(axis_codes[Z_AXIS])) z_offset += code_value();
|
|
3134
|
+ float zoffset = zprobe_zoffset;
|
|
3135
|
+ if (code_seen(axis_codes[Z_AXIS])) zoffset += code_value();
|
3121
|
3136
|
#else // !DELTA
|
3122
|
3137
|
/**
|
3123
|
3138
|
* solve the plane equation ax + by + d = z
|
|
@@ -3207,7 +3222,7 @@ inline void gcode_G28() {
|
3207
|
3222
|
eqnAMatrix[probePointCounter + 2 * abl2] = 1;
|
3208
|
3223
|
indexIntoAB[xCount][yCount] = probePointCounter;
|
3209
|
3224
|
#else
|
3210
|
|
- bed_level[xCount][yCount] = measured_z + z_offset;
|
|
3225
|
+ bed_level[xCount][yCount] = measured_z + zoffset;
|
3211
|
3226
|
#endif
|
3212
|
3227
|
|
3213
|
3228
|
probePointCounter++;
|