Browse Source

Merge pull request #5955 from thinkyhead/rc_eeprom_fail_better

Display a message for EEPROM version mismatch
Scott Lahteine 7 years ago
parent
commit
20addc6e32
1 changed files with 8 additions and 5 deletions
  1. 8
    5
      Marlin/configuration_store.cpp

+ 8
- 5
Marlin/configuration_store.cpp View File

@@ -458,13 +458,16 @@ void Config_Postprocess() {
458 458
     uint16_t stored_checksum;
459 459
     EEPROM_READ(stored_checksum);
460 460
 
461
-    //  SERIAL_ECHOPAIR("Version: [", version);
462
-    //  SERIAL_ECHOPAIR("] Stored version: [", stored_ver);
463
-    //  SERIAL_CHAR(']');
464
-    //  SERIAL_EOL;
465
-
466 461
     // Version has to match or defaults are used
467 462
     if (strncmp(version, stored_ver, 3) != 0) {
463
+      if (stored_ver[0] != 'V') {
464
+        stored_ver[0] = '?';
465
+        stored_ver[1] = '\0';
466
+      }
467
+      SERIAL_ECHO_START;
468
+      SERIAL_ECHOPGM("EEPROM version mismatch ");
469
+      SERIAL_ECHOPAIR("(EEPROM=", stored_ver);
470
+      SERIAL_ECHOLNPGM(" Marlin=" EEPROM_VERSION ")");
468 471
       Config_ResetDefault();
469 472
     }
470 473
     else {

Loading…
Cancel
Save