Backlash cleanup (#13659)

…And save backlash, fil. sensor, ExtUI userdata to EEPROM.
This commit is contained in:
Marcio Teixeira
2019-05-03 22:53:15 -06:00
committed by Scott Lahteine
parent 0181e57417
commit 15357af67c
22 changed files with 645 additions and 293 deletions

View File

@ -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
}
}