Fix and improve EEPROM storage (#12054)

* Clean up Temperature PID
* Improve EEPROM read/write/validate
* Group `SINGLENOZZLE` saved settings
* Group planner saved settings
* Group filament change saved settings
* Group skew saved settings
* Group `FWRETRACT` saved settings
This commit is contained in:
Scott Lahteine
2018-10-10 09:45:20 -05:00
committed by GitHub
parent 9b5c1a5e77
commit d556dc1865
35 changed files with 1151 additions and 1246 deletions

View File

@@ -36,9 +36,9 @@ void M217_report(const bool eeprom=false) {
const int16_t port = command_queue_port[cmd_queue_index_r];
#endif
serialprintPGM_P(port, eeprom ? PSTR(" M217") : PSTR("Singlenozzle:"));
SERIAL_ECHOPAIR_P(port, " S", singlenozzle_swap_length);
SERIAL_ECHOPAIR_P(port, " P", singlenozzle_prime_speed);
SERIAL_ECHOLNPAIR_P(port, " R", singlenozzle_retract_speed);
SERIAL_ECHOPAIR_P(port, " S", sn_settings.swap_length);
SERIAL_ECHOPAIR_P(port, " P", sn_settings.prime_speed);
SERIAL_ECHOLNPAIR_P(port, " R", sn_settings.retract_speed);
}
/**
@@ -52,9 +52,9 @@ void GcodeSuite::M217() {
bool report = true;
if (parser.seenval('S')) { report = false; const float v = parser.value_float(); singlenozzle_swap_length = constrain(v, 0, 500); }
if (parser.seenval('P')) { report = false; const int16_t v = parser.value_int(); singlenozzle_prime_speed = constrain(v, 10, 5400); }
if (parser.seenval('R')) { report = false; const int16_t v = parser.value_int(); singlenozzle_retract_speed = constrain(v, 10, 5400); }
if (parser.seenval('S')) { report = false; const float v = parser.value_float(); sn_settings.swap_length = constrain(v, 0, 500); }
if (parser.seenval('P')) { report = false; const int16_t v = parser.value_int(); sn_settings.prime_speed = constrain(v, 10, 5400); }
if (parser.seenval('R')) { report = false; const int16_t v = parser.value_int(); sn_settings.retract_speed = constrain(v, 10, 5400); }
if (report) M217_report();