From 105c81217c51f08aa54e1089377ba63f14c8f934 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Tue, 20 Mar 2018 12:08:53 +0100 Subject: [PATCH] Make 2 constants in autotune configurable But hidden, since changes are rarely needed. --- Marlin/temperature.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 56c867738a..ad0e27f003 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -408,7 +408,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], } // Did the temperature overshoot very far? - #define MAX_OVERSHOOT_PID_AUTOTUNE 20 + #ifndef MAX_OVERSHOOT_PID_AUTOTUNE + #define MAX_OVERSHOOT_PID_AUTOTUNE 20 + #endif if (current > target + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH); break; @@ -451,7 +453,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], } // every 2 seconds // Timeout after MAX_CYCLE_TIME_PID_AUTOTUNE minutes since the last undershoot/overshoot cycle - #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L + #ifndef MAX_CYCLE_TIME_PID_AUTOTUNE + #define MAX_CYCLE_TIME_PID_AUTOTUNE 20L + #endif if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) { SERIAL_PROTOCOLLNPGM(MSG_PID_TIMEOUT); break;