|
@ -14,7 +14,7 @@ |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
#define EEPROM_VERSION "V20" |
|
|
#define EEPROM_VERSION "V21" |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* V19 EEPROM Layout: |
|
|
* V19 EEPROM Layout: |
|
@ -60,6 +60,7 @@ |
|
|
* M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] |
|
|
* M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] |
|
|
* M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] |
|
|
* M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] |
|
|
* M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] |
|
|
* M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] |
|
|
|
|
|
* M301 L lpq_len |
|
|
* |
|
|
* |
|
|
* PIDTEMPBED: |
|
|
* PIDTEMPBED: |
|
|
* M304 PID bedKp, bedKi, bedKd |
|
|
* M304 PID bedKp, bedKi, bedKd |
|
@ -227,6 +228,11 @@ void Config_StoreSettings() { |
|
|
|
|
|
|
|
|
} // Extruders Loop
|
|
|
} // Extruders Loop
|
|
|
|
|
|
|
|
|
|
|
|
#if DISABLED(PID_ADD_EXTRUSION_RATE) |
|
|
|
|
|
int lpq_len = 20; |
|
|
|
|
|
#endif |
|
|
|
|
|
EEPROM_WRITE_VAR(i, lpq_len); |
|
|
|
|
|
|
|
|
#if DISABLED(PIDTEMPBED) |
|
|
#if DISABLED(PIDTEMPBED) |
|
|
float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE; |
|
|
float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE; |
|
|
#endif |
|
|
#endif |
|
@ -393,6 +399,11 @@ void Config_RetrieveSettings() { |
|
|
for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
|
|
|
for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
|
|
|
#endif // !PIDTEMP
|
|
|
#endif // !PIDTEMP
|
|
|
|
|
|
|
|
|
|
|
|
#if DISABLED(PID_ADD_EXTRUSION_RATE) |
|
|
|
|
|
int lpq_len; |
|
|
|
|
|
#endif |
|
|
|
|
|
EEPROM_READ_VAR(i, lpq_len); |
|
|
|
|
|
|
|
|
#if DISABLED(PIDTEMPBED) |
|
|
#if DISABLED(PIDTEMPBED) |
|
|
float bedKp, bedKi, bedKd; |
|
|
float bedKp, bedKi, bedKd; |
|
|
#endif |
|
|
#endif |
|
@ -539,6 +550,9 @@ void Config_ResetDefault() { |
|
|
PID_PARAM(Kc, e) = DEFAULT_Kc; |
|
|
PID_PARAM(Kc, e) = DEFAULT_Kc; |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE) |
|
|
|
|
|
lpq_len = 20; // default last-position-queue size
|
|
|
|
|
|
#endif |
|
|
// call updatePID (similar to when we have processed M301)
|
|
|
// call updatePID (similar to when we have processed M301)
|
|
|
updatePID(); |
|
|
updatePID(); |
|
|
#endif // PIDTEMP
|
|
|
#endif // PIDTEMP
|
|
@ -744,6 +758,7 @@ void Config_PrintSettings(bool forReplay) { |
|
|
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i))); |
|
|
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i))); |
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE) |
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE) |
|
|
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i)); |
|
|
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i)); |
|
|
|
|
|
if (i == 0) SERIAL_ECHOPAIR(" L", lpq_len); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
} |
|
|
} |
|
@ -758,6 +773,7 @@ void Config_PrintSettings(bool forReplay) { |
|
|
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0))); |
|
|
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0))); |
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE) |
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE) |
|
|
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0)); |
|
|
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0)); |
|
|
|
|
|
SERIAL_ECHOPAIR(" L", lpq_len); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
} |
|
|
} |
|
|