Initial implementation of PID Autotune Menu Items

Adds the parameter U to M303. If U1 is included , it will use the
PID-values from the auto-tune.
This commit is contained in:
WPBack
2016-03-20 14:56:11 +01:00
committed by Scott Lahteine
parent da9d4c4caf
commit 3b3e8a02b5
5 changed files with 42 additions and 11 deletions

View File

@ -5142,13 +5142,15 @@ inline void gcode_M226() {
inline void gcode_M303() {
int e = code_seen('E') ? code_value_short() : 0;
int c = code_seen('C') ? code_value_short() : 5;
bool u = code_seen('U') && code_value_short() == 1;
float temp = code_seen('S') ? code_value() : (e < 0 ? 70.0 : 150.0);
if (e >=0 && e < EXTRUDERS)
target_extruder = e;
KEEPALIVE_STATE(NOT_BUSY);
PID_autotune(temp, e, c);
PID_autotune(temp, e, c, u);
}
#if ENABLED(SCARA)