Expose: Homing Validation and Endstop Noise Threshold (#11912)

This commit is contained in:
Scott Lahteine
2018-09-24 21:59:12 -04:00
committed by GitHub
parent cee34f7290
commit 5490a664f5
80 changed files with 1002 additions and 996 deletions

View File

@ -30,8 +30,6 @@
#include "../inc/MarlinConfig.h"
#include <stdint.h>
#define VALIDATE_HOMING_ENDSTOPS
enum EndstopEnum : char {
X_MIN,
Y_MIN,
@ -77,7 +75,7 @@ class Endstops {
static esbits_t live_state;
static volatile uint8_t hit_state; // Use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT index
#if ENABLED(ENDSTOP_NOISE_FILTER)
#if ENDSTOP_NOISE_THRESHOLD
static esbits_t validated_live_state;
static uint8_t endstop_poll_count; // Countdown from threshold for polling
#endif
@ -123,7 +121,7 @@ class Endstops {
*/
FORCE_INLINE static esbits_t state() {
return
#if ENABLED(ENDSTOP_NOISE_FILTER)
#if ENDSTOP_NOISE_THRESHOLD
validated_live_state
#else
live_state