Cleaner failure of UBL without EEPROM

This commit is contained in:
Scott Lahteine 2017-06-07 06:14:24 -05:00
parent 9128d9ab45
commit dac29e0f75

View file

@ -8866,8 +8866,11 @@ void quickstop_stepper() {
inline void gcode_M420() {
#if ENABLED(AUTO_BED_LEVELING_UBL)
// L to load a mesh from the EEPROM
if (parser.seen('L')) {
#if ENABLED(EEPROM_SETTINGS)
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.state.storage_slot;
const int16_t a = settings.calc_num_meshes();
@ -8884,7 +8887,22 @@ void quickstop_stepper() {
settings.load_mesh(storage_slot);
ubl.state.storage_slot = storage_slot;
#else
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
return;
#endif
}
// L to load a mesh from the EEPROM
if (parser.seen('L') || parser.seen('V')) {
ubl.display_map(0); // Currently only supports one map type
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID);
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot);
}
#endif // AUTO_BED_LEVELING_UBL
// V to print the matrix or mesh
@ -8906,15 +8924,6 @@ void quickstop_stepper() {
#endif
}
#if ENABLED(AUTO_BED_LEVELING_UBL)
// L to load a mesh from the EEPROM
if (parser.seen('L') || parser.seen('V')) {
ubl.display_map(0); // Currently only supports one map type
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID);
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot);
}
#endif
bool to_enable = false;
if (parser.seen('S')) {
to_enable = parser.value_bool();