1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

Fix switching extruder

`DONT_SWITCH` got lost along the way. Replace it with `DO_SWITCH_EXTRUDER` and adjust the code.
This commit is contained in:
GMagician 2018-05-18 20:16:59 +02:00 committed by Scott Lahteine
parent 8f18854d4d
commit 3c76bda2d8
7 changed files with 9 additions and 9 deletions

View File

@ -146,7 +146,7 @@
#include "feature/fanmux.h"
#endif
#if (ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
#include "module/tool_change.h"
#endif
@ -864,7 +864,7 @@ void setup() {
setup_endstop_interrupts();
#endif
#if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH
#if DO_SWITCH_EXTRUDER
move_extruder_servo(0); // Initialize extruder servo
#endif

View File

@ -37,7 +37,7 @@
* T<tool>
* X<xoffset>
* Y<yoffset>
* Z<zoffset> - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
* Z<zoffset> - Available with DUAL_X_CARRIAGE, SWITCHING_NOZZLE and PARKING_EXTRUDER
*/
void GcodeSuite::M218() {
if (get_target_extruder_from_command() || target_extruder == 0) return;

View File

@ -445,6 +445,8 @@
#define E_MANUAL EXTRUDERS
#endif
#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
/**
* DISTINCT_E_FACTORS affects how some E factors are accessed
*/

View File

@ -3270,7 +3270,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
else
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
#if ENABLED(SWITCHING_EXTRUDER)
#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE)
#if EXTRUDERS == 4
switch (active_extruder) {

View File

@ -57,7 +57,7 @@
#include "../feature/fanmux.h"
#endif
#if ENABLED(SWITCHING_EXTRUDER)
#if DO_SWITCH_EXTRUDER
#if EXTRUDERS > 3
#define REQ_ANGLES 4
@ -347,8 +347,6 @@ inline void invalid_extruder_error(const uint8_t e) {
#endif // DUAL_X_CARRIAGE
#define DO_SWITCH_EXTRUDER (SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
/**
* Perform a tool-change, which may result in moving the
* previous tool out of the way and the new tool into place.

View File

@ -25,7 +25,7 @@
#include "../inc/MarlinConfig.h"
#if ENABLED(SWITCHING_EXTRUDER)
#if DO_SWITCH_EXTRUDER
void move_extruder_servo(const uint8_t e);
#endif