mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-29 23:07:42 +00:00
Easier to disable homing validation (#11457)
This commit is contained in:
parent
86d9af1108
commit
b8d4c4216f
@ -229,11 +229,13 @@ void Endstops::not_homing() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the last move failed to trigger an endstop, call kill
|
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
|
||||||
void Endstops::validate_homing_move() {
|
// If the last move failed to trigger an endstop, call kill
|
||||||
|
void Endstops::validate_homing_move() {
|
||||||
if (trigger_state()) hit_on_purpose();
|
if (trigger_state()) hit_on_purpose();
|
||||||
else kill(PSTR(MSG_ERR_HOMING_FAILED));
|
else kill(PSTR(MSG_ERR_HOMING_FAILED));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Enable / disable endstop z-probe checking
|
// Enable / disable endstop z-probe checking
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
#include "MarlinConfig.h"
|
#include "MarlinConfig.h"
|
||||||
|
|
||||||
|
#define VALIDATE_HOMING_ENDSTOPS
|
||||||
|
|
||||||
enum EndstopEnum : char {
|
enum EndstopEnum : char {
|
||||||
X_MIN,
|
X_MIN,
|
||||||
Y_MIN,
|
Y_MIN,
|
||||||
@ -143,8 +145,12 @@ class Endstops {
|
|||||||
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
|
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
|
||||||
static void not_homing();
|
static void not_homing();
|
||||||
|
|
||||||
|
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
|
||||||
// If the last move failed to trigger an endstop, call kill
|
// If the last move failed to trigger an endstop, call kill
|
||||||
static void validate_homing_move();
|
static void validate_homing_move();
|
||||||
|
#else
|
||||||
|
FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clear endstops (i.e., they were hit intentionally) to suppress the report
|
// Clear endstops (i.e., they were hit intentionally) to suppress the report
|
||||||
FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
|
FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user