3bba7d60f3
If using babystep to adjust the Z probe offset, the axis will move and the mesh will be updated at the same time, causing a doubling of the Z offset over the rest of the print. To correct for this, the current Z position would need to be modified in the opposite direction, canceling out the additional Z offset added to the mesh. This would be confusing to users, and moreover it would not be accurate without also taking the current Z fade level and current Z height into account. It might make sense to change the mesh in the case where no babystepping is taking place, but this could be considered an undesirable side-effect of changing the `zprobe_zoffset`. One way to remedy this would be to return to storing the mesh with `zprobe_zoffset` included, then subtracting `zprobe_zoffset` from the returned Z value. Thus, a babystep moving the Z axis up 1mm would subtract 1 from `zprobe_zoffset` while adding 1 to all mesh Z values. Without including the `zprobe_zoffset` in the `z_values` there is no safe way to alter the mesh in conjunction with babystepping, although it's fine without it.
69 lines
1.8 KiB
C
69 lines
1.8 KiB
C
/**
|
|
* Marlin 3D Printer Firmware
|
|
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
*
|
|
* Based on Sprinter and grbl.
|
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* probe.h - Move, deploy, enable, etc.
|
|
*/
|
|
|
|
#ifndef PROBE_H
|
|
#define PROBE_H
|
|
|
|
#include "../inc/MarlinConfig.h"
|
|
|
|
bool set_probe_deployed(const bool deploy);
|
|
float probe_pt(const float &rx, const float &ry, const bool, const uint8_t, const bool printable=true);
|
|
|
|
#if HAS_BED_PROBE
|
|
extern float zprobe_zoffset;
|
|
#define DEPLOY_PROBE() set_probe_deployed(true)
|
|
#define STOW_PROBE() set_probe_deployed(false)
|
|
#else
|
|
#define DEPLOY_PROBE()
|
|
#define STOW_PROBE()
|
|
#endif
|
|
|
|
#if HAS_Z_SERVO_ENDSTOP
|
|
extern const int z_servo_angle[2];
|
|
void servo_probe_init();
|
|
#endif
|
|
|
|
#if QUIET_PROBING
|
|
void probing_pause(const bool p);
|
|
#endif
|
|
|
|
#if ENABLED(PROBING_FANS_OFF)
|
|
void fans_pause(const bool p);
|
|
#endif
|
|
|
|
#if ENABLED(BLTOUCH)
|
|
void bltouch_command(int angle);
|
|
bool set_bltouch_deployed(const bool deploy);
|
|
FORCE_INLINE void bltouch_init() {
|
|
// Make sure any BLTouch error condition is cleared
|
|
bltouch_command(BLTOUCH_RESET);
|
|
set_bltouch_deployed(true);
|
|
set_bltouch_deployed(false);
|
|
}
|
|
#endif
|
|
|
|
#endif // PROBE_H
|