Quote Originally Posted by Roxy View Post
As a result of that experience, I wrote a small piece of firmware to invalidate the EEPROM so the setting are not taken from it unless you actually do an implicit store to the EEPROM. I think the original authors of Marlin were trying to save a little firmware space and did not include it. But if you are making changes to your Configuration.h file, it gets annoying having to load the default settings and save them each time. Its easier to just invalidate the EEPROM (with a M499) command:

In Marlin_Main.cpp:

case 499: // Invalidate the M500 Store settings in EEPROM command
{
Invalidate_EEPROM_Settings(); // Roxy added function to guarintee we are using
// the default values defined in the firmware!
}
If I go and find case 500 so I can put this new case 499 in front of it I'm not sure of the syntax.

I have:
/////////////////////////////////Code Start Paste///////////////////////////////////////////
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(SERVO_ENDSTOPS)
case 401:
{
engage_z_probe(); // Engage Z Servo endstop if available
}
break;

case 402:
{
retract_z_probe(); // Retract Z Servo endstop if enabled
}
break;
#endif
case 500: // M500 Store settings in EEPROM
{
Config_StoreSettings();
}
break;
/////////////////////////////////Code End Paste///////////////////////////////////////////


Does is go like this?

/////////////////////////////////Code Start Paste///////////////////////////////////////////
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(SERVO_ENDSTOPS)
case 401:
{
engage_z_probe(); // Engage Z Servo endstop if available
}
break;

case 402:
{
retract_z_probe(); // Retract Z Servo endstop if enabled
}
break;

case 499: // Invalidate the M500 Store settings in EEPROM command
{
Invalidate_EEPROM_Settings(); // Roxy added function to guarintee we are using
// the default values defined in the firmware!
}
break;

#endif
case 500: // M500 Store settings in EEPROM
{
Config_StoreSettings();
}
break;
////////////////////////////Code End Paste///////////////////////////////////////////////////


My reason for asking is it looks like each case gets a 'break;' at the end and your snippet didn't have that.