2017-09-08 20:35:25 +00:00
|
|
|
/**
|
|
|
|
* 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/>.
|
|
|
|
*
|
|
|
|
*/
|
2018-11-04 08:25:55 +00:00
|
|
|
#pragma once
|
2017-09-08 20:35:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* probe.h - Move, deploy, enable, etc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "../inc/MarlinConfig.h"
|
|
|
|
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
extern float zprobe_zoffset;
|
2017-11-19 19:59:40 +00:00
|
|
|
bool set_probe_deployed(const bool deploy);
|
2018-04-30 08:25:47 +00:00
|
|
|
#ifdef Z_AFTER_PROBING
|
2018-03-11 18:07:55 +00:00
|
|
|
void move_z_after_probing();
|
|
|
|
#endif
|
2018-03-21 06:01:43 +00:00
|
|
|
enum ProbePtRaise : unsigned char {
|
|
|
|
PROBE_PT_NONE, // No raise or stow after run_z_probe
|
|
|
|
PROBE_PT_STOW, // Do a complete stow after run_z_probe
|
2018-04-12 02:14:48 +00:00
|
|
|
PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe
|
|
|
|
PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe
|
2018-03-21 06:01:43 +00:00
|
|
|
};
|
2018-04-11 23:59:46 +00:00
|
|
|
float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true);
|
2017-09-08 20:35:25 +00:00
|
|
|
#define DEPLOY_PROBE() set_probe_deployed(true)
|
|
|
|
#define STOW_PROBE() set_probe_deployed(false)
|
2018-04-23 22:13:01 +00:00
|
|
|
#if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
2018-04-21 20:43:21 +00:00
|
|
|
extern const char msg_wait_for_bed_heating[25];
|
|
|
|
#endif
|
2017-09-08 20:35:25 +00:00
|
|
|
#else
|
|
|
|
#define DEPLOY_PROBE()
|
|
|
|
#define STOW_PROBE()
|
|
|
|
#endif
|
|
|
|
|
2018-04-02 04:54:12 +00:00
|
|
|
#if HAS_Z_SERVO_PROBE
|
2017-09-08 20:35:25 +00:00
|
|
|
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(false);
|
|
|
|
}
|
|
|
|
#endif
|