From 0de7668bacea596eee8e8a910bcffe3dfa579648 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 23 Aug 2018 15:58:08 +0200 Subject: [PATCH] Remove usage of global variable tmp_extruder in M200. --- Firmware/Marlin_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 30a4258e..276d1c7b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -5808,10 +5808,10 @@ Sigma_Exit: case 200: // M200 D set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters). { - tmp_extruder = active_extruder; + uint8_t extruder = active_extruder; if(code_seen('T')) { - tmp_extruder = code_value(); - if(tmp_extruder >= EXTRUDERS) { + extruder = code_value(); + if(extruder >= EXTRUDERS) { SERIAL_ECHO_START; SERIAL_ECHO(_i("M200 Invalid extruder "));////MSG_M200_INVALID_EXTRUDER c=0 r=0 break; @@ -5825,7 +5825,7 @@ Sigma_Exit: // for all extruders volumetric_enabled = false; } else { - filament_size[tmp_extruder] = (float)code_value(); + filament_size[extruder] = (float)code_value(); // make sure all extruders have some sane value for the filament size filament_size[0] = (filament_size[0] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[0]); #if EXTRUDERS > 1