Browse Source

Consistent Probe XY offset type

Scott Lahteine 4 years ago
parent
commit
296a2ad7e4

+ 1
- 1
Marlin/src/gcode/calibrate/G76_M192_M871.cpp View File

144
 
144
 
145
   const xyz_pos_t parkpos = temp_comp.park_point,
145
   const xyz_pos_t parkpos = temp_comp.park_point,
146
             probe_pos_xyz = xyz_pos_t(temp_comp.measure_point) + xyz_pos_t({ 0.0f, 0.0f, PTC_PROBE_HEATING_OFFSET }),
146
             probe_pos_xyz = xyz_pos_t(temp_comp.measure_point) + xyz_pos_t({ 0.0f, 0.0f, PTC_PROBE_HEATING_OFFSET }),
147
-              noz_pos_xyz = probe_pos_xyz - xy_pos_t(probe.offset_xy); // Nozzle position based on probe position
147
+              noz_pos_xyz = probe_pos_xyz - probe.offset_xy;  // Nozzle position based on probe position
148
 
148
 
149
   if (do_bed_cal || do_probe_cal) {
149
   if (do_bed_cal || do_probe_cal) {
150
     // Ensure park position is reachable
150
     // Ensure park position is reachable

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

89
 xyz_pos_t Probe::offset; // Initialized by settings.load()
89
 xyz_pos_t Probe::offset; // Initialized by settings.load()
90
 
90
 
91
 #if HAS_PROBE_XY_OFFSET
91
 #if HAS_PROBE_XY_OFFSET
92
-  const xyz_pos_t &Probe::offset_xy = Probe::offset;
92
+  const xy_pos_t &Probe::offset_xy = xy_pos_t(Probe::offset);
93
 #endif
93
 #endif
94
 
94
 
95
 #if ENABLED(Z_PROBE_SLED)
95
 #if ENABLED(Z_PROBE_SLED)

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

112
   FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {
112
   FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {
113
     return (
113
     return (
114
       #if IS_KINEMATIC
114
       #if IS_KINEMATIC
115
-         can_reach(lf.x, 0) && can_reach(rb.x, 0) && can_reach(0, lf.y) && can_reach(0, rb.y)
115
+        can_reach(lf.x, 0) && can_reach(rb.x, 0) && can_reach(0, lf.y) && can_reach(0, rb.y)
116
       #else
116
       #else
117
-         can_reach(lf) && can_reach(rb)
117
+        can_reach(lf) && can_reach(rb)
118
       #endif
118
       #endif
119
     );
119
     );
120
   }
120
   }
122
   // Use offset_xy for read only access
122
   // Use offset_xy for read only access
123
   // More optimal the XY offset is known to always be zero.
123
   // More optimal the XY offset is known to always be zero.
124
   #if HAS_PROBE_XY_OFFSET
124
   #if HAS_PROBE_XY_OFFSET
125
-    static const xyz_pos_t &offset_xy;
125
+    static const xy_pos_t &offset_xy;
126
   #else
126
   #else
127
     static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 });   // See #16767
127
     static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 });   // See #16767
128
   #endif
128
   #endif

Loading…
Cancel
Save