Browse Source

Use 'target_extruder' in M104 as with M109 (#12448)

pull/1/head
Ludy 6 years ago
committed by Scott Lahteine
parent
commit
56a94c2a26
  1. 14
      Marlin/src/gcode/temperature/M104_M109.cpp

14
Marlin/src/gcode/temperature/M104_M109.cpp

@ -43,22 +43,22 @@ void GcodeSuite::M104() {
if (DEBUGGING(DRYRUN)) return; if (DEBUGGING(DRYRUN)) return;
#if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
constexpr int8_t e = 0; constexpr int8_t target_extruder = 0;
#else #else
const int8_t e = get_target_extruder_from_command(); const int8_t target_extruder = get_target_extruder_from_command();
if (e < 0) return; if (target_extruder < 0) return;
#endif #endif
if (parser.seenval('S')) { if (parser.seenval('S')) {
const int16_t temp = parser.value_celsius(); const int16_t temp = parser.value_celsius();
#if ENABLED(SINGLENOZZLE) #if ENABLED(SINGLENOZZLE)
singlenozzle_temp[e] = temp; singlenozzle_temp[target_extruder] = temp;
if (e != active_extruder) return; if (target_extruder != active_extruder) return;
#endif #endif
thermalManager.setTargetHotend(temp, e); thermalManager.setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
if (dxc_is_duplicating() && e == 0) if (dxc_is_duplicating() && target_extruder == 0)
thermalManager.setTargetHotend(temp ? temp + duplicate_extruder_temp_offset : 0, 1); thermalManager.setTargetHotend(temp ? temp + duplicate_extruder_temp_offset : 0, 1);
#endif #endif

Loading…
Cancel
Save