Browse Source

zprobe_offset => probe_offset

Scott Lahteine 5 years ago
parent
commit
4e8d9fe59b

+ 9
- 9
Marlin/src/core/utility.cpp View File

@@ -79,36 +79,36 @@ void safe_delay(millis_t ms) {
79 79
     );
80 80
 
81 81
     #if HAS_BED_PROBE
82
-      SERIAL_ECHOPAIR("Probe Offset X:", zprobe_offset[X_AXIS], " Y:", zprobe_offset[Y_AXIS], " Z:", zprobe_offset[Z_AXIS]);
83
-      if (zprobe_offset[X_AXIS] > 0)
82
+      SERIAL_ECHOPAIR("Probe Offset X:", probe_offset[X_AXIS], " Y:", probe_offset[Y_AXIS], " Z:", probe_offset[Z_AXIS]);
83
+      if (probe_offset[X_AXIS] > 0)
84 84
         SERIAL_ECHOPGM(" (Right");
85
-      else if (zprobe_offset[X_AXIS] < 0)
85
+      else if (probe_offset[X_AXIS] < 0)
86 86
         SERIAL_ECHOPGM(" (Left");
87
-      else if (zprobe_offset[Y_AXIS] != 0)
87
+      else if (probe_offset[Y_AXIS] != 0)
88 88
         SERIAL_ECHOPGM(" (Middle");
89 89
       else
90 90
         SERIAL_ECHOPGM(" (Aligned With");
91 91
 
92
-      if (zprobe_offset[Y_AXIS] > 0) {
92
+      if (probe_offset[Y_AXIS] > 0) {
93 93
         #if IS_SCARA
94 94
           SERIAL_ECHOPGM("-Distal");
95 95
         #else
96 96
           SERIAL_ECHOPGM("-Back");
97 97
         #endif
98 98
       }
99
-      else if (zprobe_offset[Y_AXIS] < 0) {
99
+      else if (probe_offset[Y_AXIS] < 0) {
100 100
         #if IS_SCARA
101 101
           SERIAL_ECHOPGM("-Proximal");
102 102
         #else
103 103
           SERIAL_ECHOPGM("-Front");
104 104
         #endif
105 105
       }
106
-      else if (zprobe_offset[X_AXIS] != 0)
106
+      else if (probe_offset[X_AXIS] != 0)
107 107
         SERIAL_ECHOPGM("-Center");
108 108
 
109
-      if (zprobe_offset[Z_AXIS] < 0)
109
+      if (probe_offset[Z_AXIS] < 0)
110 110
         SERIAL_ECHOPGM(" & Below");
111
-      else if (zprobe_offset[Z_AXIS] > 0)
111
+      else if (probe_offset[Z_AXIS] > 0)
112 112
         SERIAL_ECHOPGM(" & Above");
113 113
       else
114 114
         SERIAL_ECHOPGM(" & Same Z as");

+ 2
- 2
Marlin/src/feature/bedlevel/ubl/ubl.cpp View File

@@ -180,8 +180,8 @@
180 180
     // Add XY probe offset from extruder because probe_pt() subtracts them when
181 181
     // moving to the xy position to be measured. This ensures better agreement between
182 182
     // the current Z position after G28 and the mesh values.
183
-    const float current_xi = find_closest_x_index(current_position[X_AXIS] + zprobe_offset[X_AXIS]),
184
-                current_yi = find_closest_y_index(current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
183
+    const float current_xi = find_closest_x_index(current_position[X_AXIS] + probe_offset[X_AXIS]),
184
+                current_yi = find_closest_y_index(current_position[Y_AXIS] + probe_offset[Y_AXIS]);
185 185
 
186 186
     if (!lcd) SERIAL_EOL();
187 187
     for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {

+ 9
- 9
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -453,7 +453,7 @@
453 453
               SERIAL_ECHO(g29_y_pos);
454 454
               SERIAL_ECHOLNPGM(").\n");
455 455
             }
456
-            probe_entire_mesh(g29_x_pos + zprobe_offset[X_AXIS], g29_y_pos + zprobe_offset[Y_AXIS],
456
+            probe_entire_mesh(g29_x_pos + probe_offset[X_AXIS], g29_y_pos + probe_offset[Y_AXIS],
457 457
                               parser.seen('T'), parser.seen('E'), parser.seen('U'));
458 458
 
459 459
             report_current_position();
@@ -482,8 +482,8 @@
482 482
                 g29_x_pos = X_HOME_POS;
483 483
                 g29_y_pos = Y_HOME_POS;
484 484
               #else // cartesian
485
-                g29_x_pos = zprobe_offset[X_AXIS] > 0 ? X_BED_SIZE : 0;
486
-                g29_y_pos = zprobe_offset[Y_AXIS] < 0 ? Y_BED_SIZE : 0;
485
+                g29_x_pos = probe_offset[X_AXIS] > 0 ? X_BED_SIZE : 0;
486
+                g29_y_pos = probe_offset[Y_AXIS] < 0 ? Y_BED_SIZE : 0;
487 487
               #endif
488 488
             }
489 489
 
@@ -800,8 +800,8 @@
800 800
       restore_ubl_active_state_and_leave();
801 801
 
802 802
       do_blocking_move_to_xy(
803
-        constrain(rx - zprobe_offset[X_AXIS], MESH_MIN_X, MESH_MAX_X),
804
-        constrain(ry - zprobe_offset[Y_AXIS], MESH_MIN_Y, MESH_MAX_Y)
803
+        constrain(rx - probe_offset[X_AXIS], MESH_MIN_X, MESH_MAX_X),
804
+        constrain(ry - probe_offset[Y_AXIS], MESH_MIN_Y, MESH_MAX_Y)
805 805
       );
806 806
     }
807 807
 
@@ -1281,8 +1281,8 @@
1281 1281
     out_mesh.distance = -99999.9f;
1282 1282
 
1283 1283
     // Get our reference position. Either the nozzle or probe location.
1284
-    const float px = rx + (probe_as_reference == USE_PROBE_AS_REFERENCE ? zprobe_offset[X_AXIS] : 0),
1285
-                py = ry + (probe_as_reference == USE_PROBE_AS_REFERENCE ? zprobe_offset[Y_AXIS] : 0);
1284
+    const float px = rx + (probe_as_reference == USE_PROBE_AS_REFERENCE ? probe_offset[X_AXIS] : 0),
1285
+                py = ry + (probe_as_reference == USE_PROBE_AS_REFERENCE ? probe_offset[Y_AXIS] : 0);
1286 1286
 
1287 1287
     float best_so_far = 99999.99f;
1288 1288
 
@@ -1500,7 +1500,7 @@
1500 1500
                 DEBUG_ECHOPAIR_F("   correction: ", get_z_correction(rx, ry), 7);
1501 1501
               }
1502 1502
 
1503
-              measured_z -= get_z_correction(rx, ry) /* + zprobe_offset[Z_AXIS] */ ;
1503
+              measured_z -= get_z_correction(rx, ry) /* + probe_offset[Z_AXIS] */ ;
1504 1504
 
1505 1505
               if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F("   final >>>---> ", measured_z, 7);
1506 1506
 
@@ -1712,7 +1712,7 @@
1712 1712
       adjust_mesh_to_mean(g29_c_flag, g29_constant);
1713 1713
 
1714 1714
       #if HAS_BED_PROBE
1715
-        SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", zprobe_offset[Z_AXIS], 7);
1715
+        SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe_offset[Z_AXIS], 7);
1716 1716
       #endif
1717 1717
 
1718 1718
       SERIAL_ECHOLNPAIR("MESH_MIN_X  " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);

+ 2
- 2
Marlin/src/gcode/bedlevel/G42.cpp View File

@@ -49,8 +49,8 @@ void GcodeSuite::G42() {
49 49
     if (hasJ) destination[Y_AXIS] = _GET_MESH_Y(iy);
50 50
     #if HAS_BED_PROBE
51 51
       if (parser.boolval('P')) {
52
-        if (hasI) destination[X_AXIS] -= zprobe_offset[X_AXIS];
53
-        if (hasJ) destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
52
+        if (hasI) destination[X_AXIS] -= probe_offset[X_AXIS];
53
+        if (hasJ) destination[Y_AXIS] -= probe_offset[Y_AXIS];
54 54
       }
55 55
     #endif
56 56
 

+ 2
- 2
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -947,8 +947,8 @@ G29_TYPE GcodeSuite::G29() {
947 947
         planner.leveling_active = false;
948 948
 
949 949
         // Use the last measured distance to the bed, if possible
950
-        if ( NEAR(current_position[X_AXIS], xProbe - zprobe_offset[X_AXIS])
951
-          && NEAR(current_position[Y_AXIS], yProbe - zprobe_offset[Y_AXIS])
950
+        if ( NEAR(current_position[X_AXIS], xProbe - probe_offset[X_AXIS])
951
+          && NEAR(current_position[Y_AXIS], yProbe - probe_offset[Y_AXIS])
952 952
         ) {
953 953
           const float simple_z = current_position[Z_AXIS] - measured_z;
954 954
           if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, "  Matrix Z", converted[Z_AXIS], "  Discrepancy ", simple_z - converted[Z_AXIS]);

+ 2
- 2
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -136,8 +136,8 @@
136 136
     destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height
137 137
 
138 138
     #if HOMING_Z_WITH_PROBE
139
-      destination[X_AXIS] -= zprobe_offset[X_AXIS];
140
-      destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
139
+      destination[X_AXIS] -= probe_offset[X_AXIS];
140
+      destination[Y_AXIS] -= probe_offset[Y_AXIS];
141 141
     #endif
142 142
 
143 143
     if (position_is_reachable(destination[X_AXIS], destination[Y_AXIS])) {

+ 4
- 4
Marlin/src/gcode/calibrate/M48.cpp View File

@@ -77,8 +77,8 @@ void GcodeSuite::M48() {
77 77
   float X_current = current_position[X_AXIS],
78 78
         Y_current = current_position[Y_AXIS];
79 79
 
80
-  const float X_probe_location = parser.linearval('X', X_current + zprobe_offset[X_AXIS]),
81
-              Y_probe_location = parser.linearval('Y', Y_current + zprobe_offset[Y_AXIS]);
80
+  const float X_probe_location = parser.linearval('X', X_current + probe_offset[X_AXIS]),
81
+              Y_probe_location = parser.linearval('Y', Y_current + probe_offset[Y_AXIS]);
82 82
 
83 83
   if (!position_is_reachable_by_probe(X_probe_location, Y_probe_location)) {
84 84
     SERIAL_ECHOLNPGM("? (X,Y) out of bounds.");
@@ -165,8 +165,8 @@ void GcodeSuite::M48() {
165 165
           while (angle < 0.0) angle += 360.0;   // outside of this range.   It looks like they behave correctly with
166 166
                                                 // numbers outside of the range, but just to be safe we clamp them.
167 167
 
168
-          X_current = X_probe_location - zprobe_offset[X_AXIS] + cos(RADIANS(angle)) * radius;
169
-          Y_current = Y_probe_location - zprobe_offset[Y_AXIS] + sin(RADIANS(angle)) * radius;
168
+          X_current = X_probe_location - probe_offset[X_AXIS] + cos(RADIANS(angle)) * radius;
169
+          Y_current = Y_probe_location - probe_offset[Y_AXIS] + sin(RADIANS(angle)) * radius;
170 170
 
171 171
           #if DISABLED(DELTA)
172 172
             LIMIT(X_current, X_MIN_POS, X_MAX_POS);

+ 2
- 2
Marlin/src/gcode/motion/M290.cpp View File

@@ -42,9 +42,9 @@
42 42
         && active_extruder == 0
43 43
       #endif
44 44
     ) {
45
-      zprobe_offset[Z_AXIS] += offs;
45
+      probe_offset[Z_AXIS] += offs;
46 46
       SERIAL_ECHO_START();
47
-      SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", zprobe_offset[Z_AXIS]);
47
+      SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", probe_offset[Z_AXIS]);
48 48
     }
49 49
     #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
50 50
       else {

+ 2
- 2
Marlin/src/gcode/probe/G30.cpp View File

@@ -39,8 +39,8 @@
39 39
  *   E   Engage the probe for each probe (default 1)
40 40
  */
41 41
 void GcodeSuite::G30() {
42
-  const float xpos = parser.linearval('X', current_position[X_AXIS] + zprobe_offset[X_AXIS]),
43
-              ypos = parser.linearval('Y', current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
42
+  const float xpos = parser.linearval('X', current_position[X_AXIS] + probe_offset[X_AXIS]),
43
+              ypos = parser.linearval('Y', current_position[Y_AXIS] + probe_offset[Y_AXIS]);
44 44
 
45 45
   if (!position_is_reachable_by_probe(xpos, ypos)) return;
46 46
 

+ 7
- 7
Marlin/src/gcode/probe/M851.cpp View File

@@ -36,17 +36,17 @@ void GcodeSuite::M851() {
36 36
   // Show usage with no parameters
37 37
   if (!parser.seen("XYZ")) {
38 38
     SERIAL_ECHO_START();
39
-    SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", zprobe_offset[X_AXIS],
40
-                                       " Y", zprobe_offset[Y_AXIS],
41
-                                       " Z", zprobe_offset[Z_AXIS]);
39
+    SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", probe_offset[X_AXIS],
40
+                                       " Y", probe_offset[Y_AXIS],
41
+                                       " Z", probe_offset[Z_AXIS]);
42 42
     return;
43 43
   }
44 44
 
45 45
   // Get the modified offsets
46 46
   const float offs[] = {
47
-    parser.floatval('X', zprobe_offset[X_AXIS]),
48
-    parser.floatval('Y', zprobe_offset[Y_AXIS]),
49
-    parser.floatval('Z', zprobe_offset[Z_AXIS])
47
+    parser.floatval('X', probe_offset[X_AXIS]),
48
+    parser.floatval('Y', probe_offset[Y_AXIS]),
49
+    parser.floatval('Z', probe_offset[Z_AXIS])
50 50
   };
51 51
 
52 52
   // Error-check
@@ -64,7 +64,7 @@ void GcodeSuite::M851() {
64 64
   }
65 65
 
66 66
   // Save the new offsets
67
-  LOOP_XYZ(a) zprobe_offset[a] = offs[a];
67
+  LOOP_XYZ(a) probe_offset[a] = offs[a];
68 68
 }
69 69
 
70 70
 #endif // HAS_BED_PROBE

+ 3
- 3
Marlin/src/lcd/extensible_ui/ui_api.cpp View File

@@ -708,7 +708,7 @@ namespace ExtUI {
708 708
           #if EXTRUDERS > 1
709 709
             && (linked_nozzles || active_extruder == 0)
710 710
           #endif
711
-        ) zprobe_offset[Z_AXIS] += mm;
711
+        ) probe_offset[Z_AXIS] += mm;
712 712
       #else
713 713
         UNUSED(mm);
714 714
       #endif
@@ -746,7 +746,7 @@ namespace ExtUI {
746 746
 
747 747
   float getZOffset_mm() {
748 748
     #if HAS_BED_PROBE
749
-      return zprobe_offset[Z_AXIS];
749
+      return probe_offset[Z_AXIS];
750 750
     #elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
751 751
       return babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1];
752 752
     #else
@@ -757,7 +757,7 @@ namespace ExtUI {
757 757
   void setZOffset_mm(const float value) {
758 758
     #if HAS_BED_PROBE
759 759
       if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
760
-        zprobe_offset[Z_AXIS] = value;
760
+        probe_offset[Z_AXIS] = value;
761 761
     #elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
762 762
       babystep.add_mm(Z_AXIS, (value - babystep.axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]));
763 763
     #else

+ 4
- 4
Marlin/src/lcd/menu/menu.cpp View File

@@ -402,7 +402,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
402 402
       ui.encoderPosition = 0;
403 403
 
404 404
       const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment,
405
-                  new_probe_offset = zprobe_offset[Z_AXIS] + diff,
405
+                  new_probe_offset = probe_offset[Z_AXIS] + diff,
406 406
                   new_offs =
407 407
                     #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
408 408
                       do_probe ? new_probe_offset : hotend_offset[Z_AXIS][active_extruder] - diff
@@ -414,7 +414,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
414 414
 
415 415
         babystep.add_steps(Z_AXIS, babystep_increment);
416 416
 
417
-        if (do_probe) zprobe_offset[Z_AXIS] = new_offs;
417
+        if (do_probe) probe_offset[Z_AXIS] = new_offs;
418 418
         #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
419 419
           else hotend_offset[Z_AXIS][active_extruder] = new_offs;
420 420
         #endif
@@ -428,10 +428,10 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
428 428
           draw_edit_screen(PSTR(MSG_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
429 429
         else
430 430
       #endif
431
-          draw_edit_screen(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_offset[Z_AXIS]));
431
+          draw_edit_screen(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(probe_offset[Z_AXIS]));
432 432
 
433 433
       #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
434
-        if (do_probe) _lcd_zoffset_overlay_gfx(zprobe_offset[Z_AXIS]);
434
+        if (do_probe) _lcd_zoffset_overlay_gfx(probe_offset[Z_AXIS]);
435 435
       #endif
436 436
     }
437 437
   }

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_leveling.cpp View File

@@ -279,7 +279,7 @@ void menu_bed_leveling() {
279 279
   #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
280 280
     MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
281 281
   #elif HAS_BED_PROBE
282
-    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
282
+    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &probe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
283 283
   #endif
284 284
 
285 285
   #if ENABLED(LEVEL_BED_CORNERS)

+ 1
- 1
Marlin/src/lcd/menu/menu_configuration.cpp View File

@@ -347,7 +347,7 @@ void menu_configuration() {
347 347
   #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
348 348
     MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
349 349
   #elif HAS_BED_PROBE
350
-    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
350
+    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &probe_offset[Z_AXIS], Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
351 351
   #endif
352 352
 
353 353
   const bool busy = printer_busy();

+ 9
- 9
Marlin/src/module/configuration_store.cpp View File

@@ -176,7 +176,7 @@ typedef struct SettingsDataStruct {
176 176
   // HAS_BED_PROBE
177 177
   //
178 178
 
179
-  float zprobe_offset[XYZ];
179
+  float probe_offset[XYZ];
180 180
 
181 181
   //
182 182
   // ABL_PLANAR
@@ -613,8 +613,8 @@ void MarlinSettings::postprocess() {
613 613
     // Probe Z Offset
614 614
     //
615 615
     {
616
-      _FIELD_TEST(zprobe_offset[Z_AXIS]);
617
-      EEPROM_WRITE(zprobe_offset);
616
+      _FIELD_TEST(probe_offset[Z_AXIS]);
617
+      EEPROM_WRITE(probe_offset);
618 618
     }
619 619
 
620 620
     //
@@ -1415,10 +1415,10 @@ void MarlinSettings::postprocess() {
1415 1415
       // Probe Z Offset
1416 1416
       //
1417 1417
       {
1418
-        _FIELD_TEST(zprobe_offset[Z_AXIS]);
1418
+        _FIELD_TEST(probe_offset[Z_AXIS]);
1419 1419
 
1420 1420
         #if HAS_BED_PROBE
1421
-          float (&zpo)[XYZ] = zprobe_offset;
1421
+          float (&zpo)[XYZ] = probe_offset;
1422 1422
         #else
1423 1423
           float zpo[XYZ];
1424 1424
         #endif
@@ -2322,7 +2322,7 @@ void MarlinSettings::reset() {
2322 2322
     #endif
2323 2323
     constexpr float dpo[XYZ] = NOZZLE_TO_PROBE_OFFSET;
2324 2324
     static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z.");
2325
-    LOOP_XYZ(a) zprobe_offset[a] = dpo[a];
2325
+    LOOP_XYZ(a) probe_offset[a] = dpo[a];
2326 2326
   #endif
2327 2327
 
2328 2328
   //
@@ -3071,9 +3071,9 @@ void MarlinSettings::reset() {
3071 3071
         say_units(true);
3072 3072
       }
3073 3073
       CONFIG_ECHO_START();
3074
-      SERIAL_ECHOLNPAIR("  M851 X", LINEAR_UNIT(zprobe_offset[X_AXIS]),
3075
-                              " Y", LINEAR_UNIT(zprobe_offset[Y_AXIS]),
3076
-                              " Z", LINEAR_UNIT(zprobe_offset[Z_AXIS]));
3074
+      SERIAL_ECHOLNPAIR("  M851 X", LINEAR_UNIT(probe_offset[X_AXIS]),
3075
+                              " Y", LINEAR_UNIT(probe_offset[Y_AXIS]),
3076
+                              " Z", LINEAR_UNIT(probe_offset[Z_AXIS]));
3077 3077
     #endif
3078 3078
 
3079 3079
     /**

+ 1
- 1
Marlin/src/module/delta.cpp View File

@@ -233,7 +233,7 @@ void home_delta() {
233 233
   // Move all carriages together linearly until an endstop is hit.
234 234
   destination[Z_AXIS] = (delta_height
235 235
     #if HAS_BED_PROBE
236
-      - zprobe_offset[Z_AXIS]
236
+      - probe_offset[Z_AXIS]
237 237
     #endif
238 238
     + 10);
239 239
   buffer_line_to_destination(homing_feedrate(X_AXIS));

+ 4
- 4
Marlin/src/module/motion.cpp View File

@@ -505,7 +505,7 @@ void restore_feedrate_and_scaling() {
505 505
       soft_endstop[axis].min = base_min_pos(axis);
506 506
       soft_endstop[axis].max = (axis == Z_AXIS ? delta_height
507 507
       #if HAS_BED_PROBE
508
-        - zprobe_offset[Z_AXIS]
508
+        - probe_offset[Z_AXIS]
509 509
       #endif
510 510
       : base_max_pos(axis));
511 511
 
@@ -1340,7 +1340,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
1340 1340
   #elif ENABLED(DELTA)
1341 1341
     current_position[axis] = (axis == Z_AXIS ? delta_height
1342 1342
     #if HAS_BED_PROBE
1343
-      - zprobe_offset[Z_AXIS]
1343
+      - probe_offset[Z_AXIS]
1344 1344
     #endif
1345 1345
     : base_home_pos(axis));
1346 1346
   #else
@@ -1354,9 +1354,9 @@ void set_axis_is_at_home(const AxisEnum axis) {
1354 1354
     if (axis == Z_AXIS) {
1355 1355
       #if HOMING_Z_WITH_PROBE
1356 1356
 
1357
-        current_position[Z_AXIS] -= zprobe_offset[Z_AXIS];
1357
+        current_position[Z_AXIS] -= probe_offset[Z_AXIS];
1358 1358
 
1359
-        if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> zprobe_offset[Z_AXIS] = ", zprobe_offset[Z_AXIS]);
1359
+        if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe_offset[Z_AXIS] = ", probe_offset[Z_AXIS]);
1360 1360
 
1361 1361
       #else
1362 1362
 

+ 2
- 2
Marlin/src/module/motion.h View File

@@ -284,7 +284,7 @@ void homeaxis(const AxisEnum axis);
284 284
     // Return true if the both nozzle and the probe can reach the given point.
285 285
     // Note: This won't work on SCARA since the probe offset rotates with the arm.
286 286
     inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
287
-      return position_is_reachable(rx - zprobe_offset[X_AXIS], ry - zprobe_offset[Y_AXIS])
287
+      return position_is_reachable(rx - probe_offset[X_AXIS], ry - probe_offset[Y_AXIS])
288 288
              && position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
289 289
     }
290 290
   #endif
@@ -313,7 +313,7 @@ void homeaxis(const AxisEnum axis);
313 313
      *          nozzle must be be able to reach +10,-10.
314 314
      */
315 315
     inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
316
-      return position_is_reachable(rx - zprobe_offset[X_AXIS], ry - zprobe_offset[Y_AXIS])
316
+      return position_is_reachable(rx - probe_offset[X_AXIS], ry - probe_offset[Y_AXIS])
317 317
           && WITHIN(rx, probe_min_x() - slop, probe_max_x() + slop)
318 318
           && WITHIN(ry, probe_min_y() - slop, probe_max_y() + slop);
319 319
     }

+ 11
- 11
Marlin/src/module/probe.cpp View File

@@ -56,7 +56,7 @@
56 56
   #include "../feature/backlash.h"
57 57
 #endif
58 58
 
59
-float zprobe_offset[XYZ]; // Initialized by settings.load()
59
+float probe_offset[XYZ]; // Initialized by settings.load()
60 60
 
61 61
 #if ENABLED(BLTOUCH)
62 62
   #include "../feature/bltouch.h"
@@ -91,7 +91,7 @@ float probe_min_x() {
91 91
     #if ENABLED(DELTA) || IS_SCARA
92 92
       PROBE_X_MIN, MESH_MIN_X
93 93
     #else
94
-      (X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + zprobe_offset[X_AXIS]
94
+      (X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + probe_offset[X_AXIS]
95 95
     #endif
96 96
   );
97 97
 }
@@ -100,7 +100,7 @@ float probe_max_x() {
100 100
     #if ENABLED(DELTA) || IS_SCARA
101 101
       PROBE_X_MAX, MESH_MAX_X
102 102
     #else
103
-      (X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + zprobe_offset[X_AXIS]
103
+      (X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + probe_offset[X_AXIS]
104 104
     #endif
105 105
   );
106 106
 }
@@ -109,7 +109,7 @@ float probe_min_y() {
109 109
     #if ENABLED(DELTA) || IS_SCARA
110 110
       PROBE_Y_MIN, MESH_MIN_Y
111 111
     #else
112
-      (Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + zprobe_offset[Y_AXIS]
112
+      (Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + probe_offset[Y_AXIS]
113 113
     #endif
114 114
   );
115 115
 }
@@ -118,7 +118,7 @@ float probe_max_y() {
118 118
     #if ENABLED(DELTA) || IS_SCARA
119 119
       PROBE_Y_MAX, MESH_MAX_Y
120 120
     #else
121
-      (Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + zprobe_offset[Y_AXIS]
121
+      (Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + probe_offset[Y_AXIS]
122 122
     #endif
123 123
   );
124 124
 }
@@ -300,7 +300,7 @@ inline void do_probe_raise(const float z_raise) {
300 300
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("do_probe_raise(", z_raise, ")");
301 301
 
302 302
   float z_dest = z_raise;
303
-  if (zprobe_offset[Z_AXIS] < 0) z_dest -= zprobe_offset[Z_AXIS];
303
+  if (probe_offset[Z_AXIS] < 0) z_dest -= probe_offset[Z_AXIS];
304 304
 
305 305
   NOMORE(z_dest, Z_MAX_POS);
306 306
 
@@ -580,7 +580,7 @@ static float run_z_probe() {
580 580
 
581 581
   // Stop the probe before it goes too low to prevent damage.
582 582
   // If Z isn't known then probe to -10mm.
583
-  const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -zprobe_offset[Z_AXIS] + Z_PROBE_LOW_POINT : -10.0;
583
+  const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -probe_offset[Z_AXIS] + Z_PROBE_LOW_POINT : -10.0;
584 584
 
585 585
   // Double-probing does a fast probe followed by a slow probe
586 586
   #if TOTAL_PROBING == 2
@@ -605,7 +605,7 @@ static float run_z_probe() {
605 605
 
606 606
     // If the nozzle is well over the travel height then
607 607
     // move down quickly before doing the slow probe
608
-    const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (zprobe_offset[Z_AXIS] < 0 ? -zprobe_offset[Z_AXIS] : 0);
608
+    const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (probe_offset[Z_AXIS] < 0 ? -probe_offset[Z_AXIS] : 0);
609 609
     if (current_position[Z_AXIS] > z) {
610 610
       // Probe down fast. If the probe never triggered, raise for probe clearance
611 611
       if (!do_probe_move(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST)))
@@ -735,8 +735,8 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
735 735
   float nx = rx, ny = ry;
736 736
   if (probe_relative) {
737 737
     if (!position_is_reachable_by_probe(rx, ry)) return NAN;  // The given position is in terms of the probe
738
-    nx -= zprobe_offset[X_AXIS];                     // Get the nozzle position
739
-    ny -= zprobe_offset[Y_AXIS];
738
+    nx -= probe_offset[X_AXIS];                     // Get the nozzle position
739
+    ny -= probe_offset[Y_AXIS];
740 740
   }
741 741
   else if (!position_is_reachable(nx, ny)) return NAN;        // The given position is in terms of the nozzle
742 742
 
@@ -757,7 +757,7 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
757 757
 
758 758
   float measured_z = NAN;
759 759
   if (!DEPLOY_PROBE()) {
760
-    measured_z = run_z_probe() + zprobe_offset[Z_AXIS];
760
+    measured_z = run_z_probe() + probe_offset[Z_AXIS];
761 761
 
762 762
     const bool big_raise = raise_after == PROBE_PT_BIG_RAISE;
763 763
     if (big_raise || raise_after == PROBE_PT_RAISE)

+ 2
- 2
Marlin/src/module/probe.h View File

@@ -29,7 +29,7 @@
29 29
 
30 30
 #if HAS_BED_PROBE
31 31
 
32
-  extern float zprobe_offset[XYZ];
32
+  extern float probe_offset[XYZ];
33 33
   bool set_probe_deployed(const bool deploy);
34 34
   #ifdef Z_AFTER_PROBING
35 35
     void move_z_after_probing();
@@ -51,7 +51,7 @@
51 51
 
52 52
 #else
53 53
 
54
-  constexpr float zprobe_offset[XYZ] = { 0 };
54
+  constexpr float probe_offset[XYZ] = { 0 };
55 55
   #define DEPLOY_PROBE()
56 56
   #define STOW_PROBE()
57 57
 

Loading…
Cancel
Save