From bf8fd7ed9051cf794295878575451382c8fa1834 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 7 Jun 2023 12:50:56 +0200 Subject: [PATCH] Add max_overshoot_pi_autotune value Prepare for REVO 60W --- Firmware/temperature.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 7672d7f2e..4185b31eb 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -390,7 +390,10 @@ void __attribute__((noinline)) PID_autotune(float temp, int extruder, int ncycle } } } - if(input > (temp + 20)) { + #ifndef MAX_OVERSHOOT_PID_AUTOTUNE + #define MAX_OVERSHOOT_PID_AUTOTUNE 20 + #endif + if(input > (temp + MAX_OVERSHOOT_PID_AUTOTUNE)) { SERIAL_PROTOCOLLNPGM("PID Autotune failed! Temperature too high"); pid_tuning_finished = true; pid_cycle = 0;