Browse Source

Consistent Probe XY offset type

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
296a2ad7e4
  1. 2
      Marlin/src/gcode/calibrate/G76_M192_M871.cpp
  2. 2
      Marlin/src/module/probe.cpp
  3. 2
      Marlin/src/module/probe.h

2
Marlin/src/gcode/calibrate/G76_M192_M871.cpp

@ -144,7 +144,7 @@ void GcodeSuite::G76() {
const xyz_pos_t parkpos = temp_comp.park_point, const xyz_pos_t parkpos = temp_comp.park_point,
probe_pos_xyz = xyz_pos_t(temp_comp.measure_point) + xyz_pos_t({ 0.0f, 0.0f, PTC_PROBE_HEATING_OFFSET }), probe_pos_xyz = xyz_pos_t(temp_comp.measure_point) + xyz_pos_t({ 0.0f, 0.0f, PTC_PROBE_HEATING_OFFSET }),
noz_pos_xyz = probe_pos_xyz - xy_pos_t(probe.offset_xy); // Nozzle position based on probe position noz_pos_xyz = probe_pos_xyz - probe.offset_xy; // Nozzle position based on probe position
if (do_bed_cal || do_probe_cal) { if (do_bed_cal || do_probe_cal) {
// Ensure park position is reachable // Ensure park position is reachable

2
Marlin/src/module/probe.cpp

@ -89,7 +89,7 @@ Probe probe;
xyz_pos_t Probe::offset; // Initialized by settings.load() xyz_pos_t Probe::offset; // Initialized by settings.load()
#if HAS_PROBE_XY_OFFSET #if HAS_PROBE_XY_OFFSET
const xyz_pos_t &Probe::offset_xy = Probe::offset; const xy_pos_t &Probe::offset_xy = xy_pos_t(Probe::offset);
#endif #endif
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_SLED)

2
Marlin/src/module/probe.h

@ -122,7 +122,7 @@ public:
// Use offset_xy for read only access // Use offset_xy for read only access
// More optimal the XY offset is known to always be zero. // More optimal the XY offset is known to always be zero.
#if HAS_PROBE_XY_OFFSET #if HAS_PROBE_XY_OFFSET
static const xyz_pos_t &offset_xy; static const xy_pos_t &offset_xy;
#else #else
static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 }); // See #16767 static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 }); // See #16767
#endif #endif

Loading…
Cancel
Save