Add MarlinSettings::validate()

This commit is contained in:
Scott Lahteine 2018-01-02 17:22:48 -06:00
parent 760c4e94d5
commit 42216f52ab
3 changed files with 168 additions and 123 deletions

View file

@ -9837,6 +9837,18 @@ inline void gcode_M502() {
}
#endif
#if ENABLED(EEPROM_SETTINGS)
/**
* M504: Validate EEPROM Contents
*/
inline void gcode_M504() {
if (settings.validate()) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM("EEPROM OK");
}
}
#endif
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
/**
@ -12050,6 +12062,9 @@ void process_parsed_command() {
#if DISABLED(DISABLE_M503)
case 503: gcode_M503(); break; // M503: Report Settings (in SRAM)
#endif
#if ENABLED(EEPROM_SETTINGS)
case 504: gcode_M504(); break; // M504: Validate EEPROM
#endif
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
case 540: gcode_M540(); break; // M540: Set Abort on Endstop Hit for SD Printing