Add MarlinSettings::validate()
This commit is contained in:
@ -55,3 +55,15 @@ void GcodeSuite::M502() {
|
||||
}
|
||||
|
||||
#endif // !DISABLE_M503
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
/**
|
||||
* M504: Validate EEPROM Contents
|
||||
*/
|
||||
void GcodeSuite::M504() {
|
||||
if (settings.validate()) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("EEPROM OK");
|
||||
}
|
||||
}
|
||||
#endif
|
@ -610,6 +610,9 @@ void GcodeSuite::process_parsed_command() {
|
||||
#if DISABLED(DISABLE_M503)
|
||||
case 503: M503(); break; // M503: print settings currently in memory
|
||||
#endif
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
case 504: M504(); break; // M504: Validate EEPROM contents
|
||||
#endif
|
||||
|
||||
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
||||
case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
|
||||
|
@ -681,6 +681,9 @@ private:
|
||||
#if DISABLED(DISABLE_M503)
|
||||
static void M503();
|
||||
#endif
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
static void M504();
|
||||
#endif
|
||||
|
||||
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
||||
static void M540();
|
||||
|
Reference in New Issue
Block a user