Browse Source

Apply NO_MOTION_BEFORE_HOMING to joystick motion (#20462)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Vi B-P 4 years ago
parent
commit
820cc69d0a
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      Marlin/src/feature/joystick.cpp

+ 5
- 0
Marlin/src/feature/joystick.cpp View File

@@ -127,6 +127,11 @@ Joystick joystick;
127 127
     static bool injecting_now; // = false;
128 128
     if (injecting_now) return;
129 129
 
130
+    #if ENABLED(NO_MOTION_BEFORE_HOMING)
131
+      if (TERN0(HAS_JOY_ADC_X, axis_should_home(X_AXIS)) || TERN0(HAS_JOY_ADC_Y, axis_should_home(Y_AXIS)) || TERN0(HAS_JOY_ADC_Z, axis_should_home(Z_AXIS)))
132
+        return;
133
+    #endif
134
+
130 135
     static constexpr int QUEUE_DEPTH = 5;                                // Insert up to this many movements
131 136
     static constexpr float target_lag = 0.25f,                           // Aim for 1/4 second lag
132 137
                            seg_time = target_lag / QUEUE_DEPTH;          // 0.05 seconds, short segments inserted every 1/20th of a second

Loading…
Cancel
Save