Skip to content

Commit

Permalink
Make 2 constants in autotune configurable
Browse files Browse the repository at this point in the history
But hidden, since changes are rarely needed.
  • Loading branch information
AnHardt authored and thinkyhead committed Mar 20, 2018
1 parent 3911c38 commit 105c812
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Marlin/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 105c812

Please sign in to comment.