Browse Source

Fix alignment of Restore following PIDTEMP

Should be reading 4 x 4 PID values instead of 4 x 3
Scott Lahteine 10 years ago
parent
commit
ff99ca3040
1 changed files with 9 additions and 8 deletions
  1. 9
    8
      Marlin/ConfigurationStore.cpp

+ 9
- 8
Marlin/ConfigurationStore.cpp View File

161
       {
161
       {
162
     #endif // !PIDTEMP
162
     #endif // !PIDTEMP
163
 
163
 
164
-      dummy = DUMMY_PID_VALUE;
165
-      EEPROM_WRITE_VAR(i, dummy);
166
-      dummy = 0.0f;
167
-      for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
168
-    }
164
+        dummy = DUMMY_PID_VALUE;
165
+        EEPROM_WRITE_VAR(i, dummy);
166
+        dummy = 0.0f;
167
+        for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
168
+      }
169
+
169
   } // Extruders Loop
170
   } // Extruders Loop
170
 
171
 
171
   #ifndef DOGLCD
172
   #ifndef DOGLCD
290
           #endif
291
           #endif
291
         }
292
         }
292
         else {
293
         else {
293
-          for (int q=3; q--;) EEPROM_READ_VAR(i, dummy);
294
+          for (int q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
294
         }
295
         }
295
       }
296
       }
296
     #else // !PIDTEMP
297
     #else // !PIDTEMP
297
-      // 4 x 3 = 12 slots for PID parameters
298
-      for (int q=12; q--;) EEPROM_READ_VAR(i, dummy);
298
+      // 4 x 4 = 16 slots for PID parameters
299
+      for (int q=16; q--;) EEPROM_READ_VAR(i, dummy);  // 4x Kp, Ki, Kd, Kc
299
     #endif // !PIDTEMP
300
     #endif // !PIDTEMP
300
 
301
 
301
     #ifndef DOGLCD
302
     #ifndef DOGLCD

Loading…
Cancel
Save