Browse Source

Some formatting in configuration_store.cpp

Scott Lahteine 9 years ago
parent
commit
adcd0f5de3
1 changed files with 13 additions and 15 deletions
  1. 13
    15
      Marlin/configuration_store.cpp

+ 13
- 15
Marlin/configuration_store.cpp View File

@@ -38,6 +38,9 @@
38 38
 
39 39
 #define EEPROM_VERSION "V24"
40 40
 
41
+// Change EEPROM version if these are changed:
42
+#define EEPROM_OFFSET 100
43
+
41 44
 /**
42 45
  * V24 EEPROM Layout:
43 46
  *
@@ -158,23 +161,22 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
158 161
     value++;
159 162
   } while (--size);
160 163
 }
161
-#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
162
-#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
163 164
 
164 165
 /**
165 166
  * Store Configuration Settings - M500
166 167
  */
167 168
 
168
-#define DUMMY_PID_VALUE 3000.0f
169 169
 
170
-#define EEPROM_OFFSET 100
171 170
 
172 171
 #if ENABLED(EEPROM_SETTINGS)
173 172
 
173
+  #define DUMMY_PID_VALUE 3000.0f
174
+  #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
175
+  #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
176
+
174 177
 /**
175
- * Store Configuration Settings - M500
178
+ * M500 - Store Configuration
176 179
  */
177
-
178 180
 void Config_StoreSettings()  {
179 181
   float dummy = 0.0f;
180 182
   char ver[4] = "000";
@@ -349,11 +351,9 @@ void Config_StoreSettings()  {
349 351
 }
350 352
 
351 353
 /**
352
- * Retrieve Configuration Settings - M501
354
+ * M501 - Retrieve Configuration
353 355
  */
354
-
355 356
 void Config_RetrieveSettings() {
356
-
357 357
   int i = EEPROM_OFFSET;
358 358
   char stored_ver[4];
359 359
   uint16_t stored_checksum;
@@ -545,9 +545,8 @@ void Config_RetrieveSettings() {
545 545
 #endif // EEPROM_SETTINGS
546 546
 
547 547
 /**
548
- * Reset Configuration Settings - M502
548
+ * M502 - Reset Configuration
549 549
  */
550
-
551 550
 void Config_ResetDefault() {
552 551
   float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
553 552
   float tmp2[] = DEFAULT_MAX_FEEDRATE;
@@ -663,12 +662,11 @@ void Config_ResetDefault() {
663 662
 
664 663
 #if DISABLED(DISABLE_M503)
665 664
 
666
-/**
667
- * Print Configuration Settings - M503
668
- */
669
-
670 665
 #define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0)
671 666
 
667
+/**
668
+ * M503 - Print Configuration
669
+ */
672 670
 void Config_PrintSettings(bool forReplay) {
673 671
   // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
674 672
 

Loading…
Cancel
Save