Fix gcode_T

2.0.x
MagoKimbra 9 years ago
parent cd9ecfdcb1
commit 008d0637dd

@ -6624,6 +6624,8 @@ inline void gcode_T(uint8_t tmp_extruder) {
return; return;
} }
#if HOTENDS > 1
float stored_feedrate = feedrate; float stored_feedrate = feedrate;
if (code_seen('F')) { if (code_seen('F')) {
@ -6638,7 +6640,6 @@ inline void gcode_T(uint8_t tmp_extruder) {
#endif #endif
} }
#if HOTENDS > 1
if (tmp_extruder != active_extruder) { if (tmp_extruder != active_extruder) {
bool no_move = code_seen('S') && code_value_bool(); bool no_move = code_seen('S') && code_value_bool();
// Save current position to return to after applying extruder offset // Save current position to return to after applying extruder offset
@ -6794,10 +6795,15 @@ inline void gcode_T(uint8_t tmp_extruder) {
enable_solenoid_on_active_extruder(); enable_solenoid_on_active_extruder();
#endif // EXT_SOLENOID #endif // EXT_SOLENOID
#endif // HOTENDS > 1
feedrate = stored_feedrate; feedrate = stored_feedrate;
#else // !HOTENDS > 1
// Set the new active extruder
active_extruder = tmp_extruder;
#endif
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHO(MSG_ACTIVE_EXTRUDER); SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder); SERIAL_PROTOCOLLN((int)active_extruder);

Loading…
Cancel
Save