From b43c8dad746bf743cbfaabffd9cd728699aa941b Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 6 Sep 2018 10:05:59 +0200 Subject: [PATCH] Remove HotendTempBckp global variable. --- Firmware/Marlin.h | 3 +-- Firmware/Marlin_main.cpp | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 5292334f..88d9a3bf 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -335,7 +335,6 @@ extern uint8_t active_extruder; //Long pause extern int saved_feedmultiply; -extern float HotendTempBckp; extern int fanSpeedBckp; extern unsigned long pause_time; extern unsigned long start_pause_print; @@ -476,5 +475,5 @@ void proc_commands(); void M600_load_filament(); void M600_load_filament_movements(); -void M600_wait_for_user(); +void M600_wait_for_user(float HotendTempBckp); void M600_check_state(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 351ddc02..68982587 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -331,7 +331,6 @@ unsigned int usb_printing_counter; int8_t lcd_change_fil_state = 0; int feedmultiplyBckp = 100; -float HotendTempBckp = 0; int fanSpeedBckp = 0; unsigned long pause_time = 0; unsigned long start_pause_print = millis(); @@ -3059,7 +3058,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float //First backup current position and settings feedmultiplyBckp = feedmultiply; - HotendTempBckp = degTargetHotend(active_extruder); + float HotendTempBckp = degTargetHotend(active_extruder); fanSpeedBckp = fanSpeed; lastpos[X_AXIS] = current_position[X_AXIS]; @@ -3087,7 +3086,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float st_synchronize(); //Beep, manage nozzle heater and wait for user to start unload filament - if(!mmu_enabled) M600_wait_for_user(); + if(!mmu_enabled) M600_wait_for_user(HotendTempBckp); lcd_change_fil_state = 0; @@ -8116,7 +8115,6 @@ void long_pause() //long pause print //save currently set parameters to global variables saved_feedmultiply = feedmultiply; - HotendTempBckp = degTargetHotend(active_extruder); fanSpeedBckp = fanSpeed; start_pause_print = millis(); @@ -8912,7 +8910,7 @@ void M600_check_state() } } -void M600_wait_for_user() { +void M600_wait_for_user(float HotendTempBckp) { //Beep, manage nozzle heater and wait for user to start unload filament KEEPALIVE_STATE(PAUSED_FOR_USER);