Skip to content

Commit

Permalink
Mitigate false endstop triggering
Browse files Browse the repository at this point in the history
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 MarlinFirmware#8.

Thanks to @notching, @mensikv and @md66pt for the valuable feedback!
  • Loading branch information
davidramiro committed Jan 4, 2019
1 parent 5dface6 commit dca0eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ============================
Expand Down
2 changes: 1 addition & 1 deletion Marlin/endstops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dca0eb7

Please sign in to comment.