Backlash cleanup (#13659)
…And save backlash, fil. sensor, ExtUI userdata to EEPROM.
This commit is contained in:
committed by
Scott Lahteine
parent
0181e57417
commit
15357af67c
@ -32,6 +32,9 @@
|
||||
*/
|
||||
void GcodeSuite::M412() {
|
||||
if (parser.seen("HS"
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
"D"
|
||||
#endif
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
"R"
|
||||
#endif
|
||||
@ -42,11 +45,17 @@ void GcodeSuite::M412() {
|
||||
const bool seenR = parser.seen('R'), seenS = parser.seen('S');
|
||||
if (seenR || seenS) runout.reset();
|
||||
if (seenS) runout.enabled = parser.value_bool();
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
if (parser.seen('D')) runout.set_runout_distance(parser.value_linear_units());
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprintln_onoff(runout.enabled);
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
SERIAL_ECHOLNPAIR("Filament runout distance (mm): ", runout.runout_distance());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user