diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index a494e3a9d..7bf0b6e53 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -188,7 +188,7 @@ static void updateTemperaturesFromRawValues(); #endif //=========================================================================== -//================================ functions ================================ +//================================ Functions ================================ //=========================================================================== void PID_autotune(float temp, int extruder, int ncycles) @@ -342,9 +342,10 @@ void PID_autotune(float temp, int extruder, int ncycles) } if (cycles > ncycles) { SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED); - SERIAL_PROTOCOLPGM("#define DEFAULT_Kp "); SERIAL_PROTOCOLLN(Kp); - SERIAL_PROTOCOLPGM("#define DEFAULT_Ki "); SERIAL_PROTOCOLLN(Ki); - SERIAL_PROTOCOLPGM("#define DEFAULT_Kd "); SERIAL_PROTOCOLLN(Kd); + const char *estring = extruder < 0 ? "bed" : ""; + SERIAL_PROTOCOLPGM("#define DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kp "); SERIAL_PROTOCOLLN(Kp); + SERIAL_PROTOCOLPGM("#define DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Ki "); SERIAL_PROTOCOLLN(Ki); + SERIAL_PROTOCOLPGM("#define DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kd "); SERIAL_PROTOCOLLN(Kd); return; } lcd_update();