Explorar el Código

Fix reset of endstops and move state

Scott Lahteine hace 7 años
padre
commit
7261f48872
Se han modificado 3 ficheros con 5 adiciones y 12 borrados
  1. 0
    9
      Marlin/src/module/endstops.cpp
  2. 3
    3
      Marlin/src/module/endstops.h
  3. 2
    0
      Marlin/src/module/stepper.cpp

+ 0
- 9
Marlin/src/module/endstops.cpp Ver fichero

@@ -263,15 +263,6 @@ void Endstops::not_homing() {
263 263
   #endif
264 264
 }
265 265
 
266
-// Clear endstops (i.e., they were hit intentionally) to suppress the report
267
-void Endstops::hit_on_purpose() {
268
-  hit_state = 0;
269
-
270
-  #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
271
-    if (enabled) update(); // If enabling, update state now
272
-  #endif
273
-}
274
-
275 266
 // Enable / disable endstop z-probe checking
276 267
 #if HAS_BED_PROBE
277 268
   void Endstops::enable_z_probe(bool onoff) {

+ 3
- 3
Marlin/src/module/endstops.h Ver fichero

@@ -111,9 +111,9 @@ class Endstops {
111 111
     FORCE_INLINE static esbits_t state() { return live_state; }
112 112
 
113 113
     /**
114
-     * Print an error message reporting the position when the endstops were last hit.
114
+     * Report endstop hits to serial. Called from loop().
115 115
      */
116
-    static void report_state(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered
116
+    static void report_state();
117 117
 
118 118
     /**
119 119
      * Report endstop positions in response to M119
@@ -130,7 +130,7 @@ class Endstops {
130 130
     static void not_homing();
131 131
 
132 132
     // Clear endstops (i.e., they were hit intentionally) to suppress the report
133
-    static void hit_on_purpose();
133
+    FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
134 134
 
135 135
     // Enable / disable endstop z-probe checking
136 136
     #if HAS_BED_PROBE

+ 2
- 0
Marlin/src/module/stepper.cpp Ver fichero

@@ -1232,6 +1232,7 @@ void Stepper::stepper_pulse_phase_isr() {
1232 1232
   if (abort_current_block) {
1233 1233
     abort_current_block = false;
1234 1234
     if (current_block) {
1235
+      axis_did_move = 0;
1235 1236
       current_block = NULL;
1236 1237
       planner.discard_current_block();
1237 1238
     }
@@ -1541,6 +1542,7 @@ uint32_t Stepper::stepper_block_phase_isr() {
1541 1542
 
1542 1543
     // If current block is finished, reset pointer
1543 1544
     if (all_steps_done) {
1545
+      axis_did_move = 0;
1544 1546
       current_block = NULL;
1545 1547
       planner.discard_current_block();
1546 1548
     }

Loading…
Cancelar
Guardar