From af80653f3f65017c3c5a9e73e2b1360ac2e02fd2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 7 Oct 2019 21:13:15 -0500 Subject: [PATCH] Always report all PIDs in M503 Fix #14474 --- Marlin/src/module/configuration_store.cpp | 41 +++++++---------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 9c29f16c7a..a726586e13 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -2964,38 +2964,23 @@ void MarlinSettings::reset() { #if HAS_PID_HEATING CONFIG_ECHO_HEADING("PID settings:"); + #if ENABLED(PIDTEMP) - #if HOTENDS > 1 - if (forReplay) { - HOTEND_LOOP() { - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR( - " M301 E", e - , " P", PID_PARAM(Kp, e) - , " I", unscalePID_i(PID_PARAM(Ki, e)) - , " D", unscalePID_d(PID_PARAM(Kd, e)) - ); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e)); - if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); - #endif - SERIAL_EOL(); - } - } - else - #endif // HOTENDS > 1 - // !forReplay || HOTENDS == 1 - { + HOTEND_LOOP() { CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR( - " M301 P", PID_PARAM(Kp, 0) // for compatibility with hosts, only echo values for E0 - , " I", unscalePID_i(PID_PARAM(Ki, 0)) - , " D", unscalePID_d(PID_PARAM(Kd, 0)) - #if ENABLED(PID_EXTRUSION_SCALING) - , " C", PID_PARAM(Kc, 0) - , " L", thermalManager.lpq_len + SERIAL_ECHOPAIR(" M301" + #if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND) + " E", e, #endif + " P", PID_PARAM(Kp, e) + , " I", unscalePID_i(PID_PARAM(Ki, e)) + , " D", unscalePID_d(PID_PARAM(Kd, e)) ); + #if ENABLED(PID_EXTRUSION_SCALING) + SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e)); + if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); + #endif + SERIAL_EOL(); } #endif // PIDTEMP