Mitigate false endstop triggering

While adding ENDSTOP_NOISE_FILTER, I try to reduce the impact on accuracy as much as possible by reducing the endstop_poll_count to 2.

Possible fix for #8.

Thanks to @notching, @mensikv and @md66pt for the valuable feedback!
This commit is contained in:
David Ramiro 2019-01-04 01:12:46 +01:00
parent 5dface64e1
commit dca0eb752a
No known key found for this signature in database
GPG Key ID: 5B042737EBEEB736
2 changed files with 2 additions and 2 deletions

View File

@ -587,7 +587,7 @@
* (This feature is not required for common micro-switches mounted on PCBs
* based on the Makerbot design, since they already include the 100nF capacitor.)
*/
//#define ENDSTOP_NOISE_FILTER
#define ENDSTOP_NOISE_FILTER
//=============================================================================
//============================== Movement Settings ============================

View File

@ -537,7 +537,7 @@ void Endstops::update() {
*/
static esbits_t old_live_state;
if (old_live_state != live_state) {
endstop_poll_count = 7;
endstop_poll_count = 2;
old_live_state = live_state;
}
else if (endstop_poll_count && !--endstop_poll_count)