Add MarlinSettings::validate()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user