Browse Source

🩹 Allow for last non-servo extruder

Scott Lahteine 2 years ago
parent
commit
6e1f0be215
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      Marlin/src/module/tool_change.cpp

+ 2
- 1
Marlin/src/module/tool_change.cpp View File

115
 
115
 
116
   void move_extruder_servo(const uint8_t e) {
116
   void move_extruder_servo(const uint8_t e) {
117
     planner.synchronize();
117
     planner.synchronize();
118
-    if (e < EXTRUDERS) {
118
+    constexpr bool evenExtruders = !(EXTRUDERS & 1);
119
+    if (evenExtruders || e < EXTRUDERS - 1) {
119
       servo[_SERVO_NR(e)].move(servo_angles[_SERVO_NR(e)][e & 1]);
120
       servo[_SERVO_NR(e)].move(servo_angles[_SERVO_NR(e)][e & 1]);
120
       safe_delay(500);
121
       safe_delay(500);
121
     }
122
     }

Loading…
Cancel
Save