Fix alignment of Restore following PIDTEMP

Should be reading 4 x 4 PID values instead of 4 x 3
This commit is contained in:
Scott Lahteine 2015-01-28 20:48:32 -08:00
parent 093fedfde8
commit ff99ca3040

View File

@ -161,11 +161,12 @@ void Config_StoreSettings() {
{ {
#endif // !PIDTEMP #endif // !PIDTEMP
dummy = DUMMY_PID_VALUE; dummy = DUMMY_PID_VALUE;
EEPROM_WRITE_VAR(i, dummy); EEPROM_WRITE_VAR(i, dummy);
dummy = 0.0f; dummy = 0.0f;
for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy); for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
} }
} // Extruders Loop } // Extruders Loop
#ifndef DOGLCD #ifndef DOGLCD
@ -290,12 +291,12 @@ void Config_RetrieveSettings() {
#endif #endif
} }
else { else {
for (int q=3; q--;) EEPROM_READ_VAR(i, dummy); for (int q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
} }
} }
#else // !PIDTEMP #else // !PIDTEMP
// 4 x 3 = 12 slots for PID parameters // 4 x 4 = 16 slots for PID parameters
for (int q=12; q--;) EEPROM_READ_VAR(i, dummy); for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
#endif // !PIDTEMP #endif // !PIDTEMP
#ifndef DOGLCD #ifndef DOGLCD