From ae7c602031fced19173400d56fa2223260d9484b Mon Sep 17 00:00:00 2001 From: bgort Date: Thu, 4 May 2017 17:09:45 -0400 Subject: [PATCH] fix error in M105 output -- use SERIAL_PROTOCOL for ints instead of SERIAL_PROTOCOL_F (#6584) also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters --- Marlin/Marlin_main.cpp | 12 ++++++------ Marlin/temperature.h | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index a5da264326..784f267846 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6498,9 +6498,9 @@ inline void gcode_M104() { void print_heaterstates() { #if HAS_TEMP_HOTEND SERIAL_PROTOCOLPGM(" T:"); - SERIAL_PROTOCOL_F(thermalManager.degHotend(target_extruder), 1); + SERIAL_PROTOCOL(thermalManager.degHotend(target_extruder)); SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(target_extruder), 1); + SERIAL_PROTOCOL(thermalManager.degTargetHotend(target_extruder)); #if ENABLED(SHOW_TEMP_ADC_VALUES) SERIAL_PROTOCOLPAIR(" (", thermalManager.rawHotendTemp(target_extruder) / OVERSAMPLENR); SERIAL_PROTOCOLCHAR(')'); @@ -6508,9 +6508,9 @@ inline void gcode_M104() { #endif #if HAS_TEMP_BED SERIAL_PROTOCOLPGM(" B:"); - SERIAL_PROTOCOL_F(thermalManager.degBed(), 1); + SERIAL_PROTOCOL(thermalManager.degBed()); SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetBed(), 1); + SERIAL_PROTOCOL(thermalManager.degTargetBed()); #if ENABLED(SHOW_TEMP_ADC_VALUES) SERIAL_PROTOCOLPAIR(" (", thermalManager.rawBedTemp() / OVERSAMPLENR); SERIAL_PROTOCOLCHAR(')'); @@ -6520,9 +6520,9 @@ inline void gcode_M104() { HOTEND_LOOP() { SERIAL_PROTOCOLPAIR(" T", e); SERIAL_PROTOCOLCHAR(':'); - SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1); + SERIAL_PROTOCOL(thermalManager.degHotend(e)); SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(e), 1); + SERIAL_PROTOCOL(thermalManager.degTargetHotend(e)); #if ENABLED(SHOW_TEMP_ADC_VALUES) SERIAL_PROTOCOLPAIR(" (", thermalManager.rawHotendTemp(e) / OVERSAMPLENR); SERIAL_PROTOCOLCHAR(')'); diff --git a/Marlin/temperature.h b/Marlin/temperature.h index d37cb55931..35d80731e2 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -346,6 +346,7 @@ class Temperature { #endif return target_temperature[HOTEND_INDEX]; } + static int16_t degTargetBed() { return target_temperature_bed; } #if WATCH_HOTENDS @@ -356,7 +357,7 @@ class Temperature { static void start_watching_bed(); #endif - static void setTargetHotend(const int16_t &celsius, uint8_t e) { + static void setTargetHotend(const int16_t celsius, uint8_t e) { #if HOTENDS == 1 UNUSED(e); #endif @@ -372,7 +373,7 @@ class Temperature { #endif } - static void setTargetBed(const int16_t &celsius) { + static void setTargetBed(const int16_t celsius) { target_temperature_bed = celsius; #if WATCH_THE_BED start_watching_bed();