Skip to content

Commit

Permalink
✨ Configurable Switching Nozzle dwell (#24304)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation authored and thinkyhead committed Aug 1, 2022
1 parent fd31992 commit c0cb7e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
#define SWITCHING_NOZZLE_SERVO_NR 0
//#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
#endif

/**
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/tool_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
constexpr int16_t sns_angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES;
planner.synchronize();
servo[sns_index[e]].move(sns_angles[angle_index]);
safe_delay(500);
safe_delay(SWITCHING_NOZZLE_SERVO_DWELL);
}

void lower_nozzle(const uint8_t e) { _move_nozzle_servo(e, 0); }
Expand All @@ -143,7 +143,7 @@
void move_nozzle_servo(const uint8_t angle_index) {
planner.synchronize();
servo[SWITCHING_NOZZLE_SERVO_NR].move(servo_angles[SWITCHING_NOZZLE_SERVO_NR][angle_index]);
safe_delay(500);
safe_delay(SWITCHING_NOZZLE_SERVO_DWELL);
}

#endif
Expand Down

0 comments on commit c0cb7e3

Please sign in to comment.