|
|
@ -1494,6 +1494,10 @@ void MarlinSettings::postprocess() {
|
|
|
|
return (meshes_end - meshes_start_index()) / sizeof(ubl.z_values);
|
|
|
|
return (meshes_end - meshes_start_index()) / sizeof(ubl.z_values);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int MarlinSettings::mesh_slot_offset(const int8_t slot) {
|
|
|
|
|
|
|
|
return meshes_end - (slot + 1) * sizeof(ubl.z_values);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MarlinSettings::store_mesh(const int8_t slot) {
|
|
|
|
void MarlinSettings::store_mesh(const int8_t slot) {
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
@ -1509,8 +1513,8 @@ void MarlinSettings::postprocess() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int pos = mesh_slot_offset(slot);
|
|
|
|
uint16_t crc = 0;
|
|
|
|
uint16_t crc = 0;
|
|
|
|
int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HAL::PersistentStore::access_start();
|
|
|
|
HAL::PersistentStore::access_start();
|
|
|
|
const bool status = HAL::PersistentStore::write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
|
|
|
|
const bool status = HAL::PersistentStore::write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
|
|
|
@ -1546,8 +1550,8 @@ void MarlinSettings::postprocess() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int pos = mesh_slot_offset(slot);
|
|
|
|
uint16_t crc = 0;
|
|
|
|
uint16_t crc = 0;
|
|
|
|
int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
|
|
|
|
|
|
|
|
uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
|
|
|
|
uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
|
|
|
|
|
|
|
|
|
|
|
|
HAL::PersistentStore::access_start();
|
|
|
|
HAL::PersistentStore::access_start();
|
|
|
|