[2.0.x] Enhancements to FILAMENT_RUNOUT_SENSOR (#12069)

- Added FILAMENT_RUNOUT_DISTANCE_MM option
- Added FILAMENT_MOTION_SENSOR option
This commit is contained in:
Marcio Teixeira authored and Scott Lahteine committed 2018-10-16 07:28:52 -05:00
1 parent cce4931342
commit 056561df93
84 files changed
+1233 -90

No files matched your search

+7
View File
@@ -109,6 +109,10 @@
Stepper stepper; // Singleton
#if FILAMENT_RUNOUT_DISTANCE_MM > 0
#include "../feature/runout.h"
#endif
// public:
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
@@ -1473,6 +1477,9 @@ uint32_t Stepper::stepper_block_phase_isr() {
// If current block is finished, reset pointer
if (step_events_completed >= step_event_count) {
#if FILAMENT_RUNOUT_DISTANCE_MM > 0
runout.block_complete(current_block);
#endif
axis_did_move = 0;
current_block = NULL;
planner.discard_current_block();