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:
@ -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)
|
||||
|
Reference in New Issue
Block a user