|
@@ -37,7 +37,7 @@
|
37
|
37
|
*/
|
38
|
38
|
|
39
|
39
|
// Change EEPROM version if the structure changes
|
40
|
|
-#define EEPROM_VERSION "V48"
|
|
40
|
+#define EEPROM_VERSION "V49"
|
41
|
41
|
#define EEPROM_OFFSET 100
|
42
|
42
|
|
43
|
43
|
// Check the integrity of data offsets.
|
|
@@ -114,7 +114,6 @@ typedef struct SettingsDataStruct {
|
114
|
114
|
//
|
115
|
115
|
// MESH_BED_LEVELING
|
116
|
116
|
//
|
117
|
|
- bool mbl_has_mesh; // mbl.has_mesh
|
118
|
117
|
float mbl_z_offset; // mbl.z_offset
|
119
|
118
|
uint8_t mesh_num_x, mesh_num_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
|
120
|
119
|
#if ENABLED(MESH_BED_LEVELING)
|
|
@@ -297,7 +296,6 @@ void MarlinSettings::postprocess() {
|
297
|
296
|
|
298
|
297
|
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
299
|
298
|
refresh_bed_level();
|
300
|
|
- //set_bed_leveling_enabled(leveling_is_on);
|
301
|
299
|
#endif
|
302
|
300
|
|
303
|
301
|
#if HAS_MOTOR_CURRENT_PWM
|
|
@@ -425,16 +423,13 @@ void MarlinSettings::postprocess() {
|
425
|
423
|
"MBL Z array is the wrong size."
|
426
|
424
|
);
|
427
|
425
|
const uint8_t mesh_num_x = GRID_MAX_POINTS_X, mesh_num_y = GRID_MAX_POINTS_Y;
|
428
|
|
- EEPROM_WRITE(mbl.has_mesh);
|
429
|
426
|
EEPROM_WRITE(mbl.z_offset);
|
430
|
427
|
EEPROM_WRITE(mesh_num_x);
|
431
|
428
|
EEPROM_WRITE(mesh_num_y);
|
432
|
429
|
EEPROM_WRITE(mbl.z_values);
|
433
|
430
|
#else // For disabled MBL write a default mesh
|
434
|
|
- const bool leveling_is_on = false;
|
435
|
431
|
dummy = 0.0f;
|
436
|
432
|
const uint8_t mesh_num_x = 3, mesh_num_y = 3;
|
437
|
|
- EEPROM_WRITE(leveling_is_on);
|
438
|
433
|
EEPROM_WRITE(dummy); // z_offset
|
439
|
434
|
EEPROM_WRITE(mesh_num_x);
|
440
|
435
|
EEPROM_WRITE(mesh_num_y);
|
|
@@ -925,18 +920,13 @@ void MarlinSettings::postprocess() {
|
925
|
920
|
// Mesh (Manual) Bed Leveling
|
926
|
921
|
//
|
927
|
922
|
|
928
|
|
- bool leveling_is_on;
|
929
|
923
|
uint8_t mesh_num_x, mesh_num_y;
|
930
|
|
- EEPROM_READ_ALWAYS(leveling_is_on);
|
931
|
924
|
EEPROM_READ(dummy);
|
932
|
925
|
EEPROM_READ_ALWAYS(mesh_num_x);
|
933
|
926
|
EEPROM_READ_ALWAYS(mesh_num_y);
|
934
|
927
|
|
935
|
928
|
#if ENABLED(MESH_BED_LEVELING)
|
936
|
|
- if (!validating) {
|
937
|
|
- mbl.has_mesh = leveling_is_on;
|
938
|
|
- mbl.z_offset = dummy;
|
939
|
|
- }
|
|
929
|
+ if (!validating) mbl.z_offset = dummy;
|
940
|
930
|
if (mesh_num_x == GRID_MAX_POINTS_X && mesh_num_y == GRID_MAX_POINTS_Y) {
|
941
|
931
|
// EEPROM data fits the current mesh
|
942
|
932
|
EEPROM_READ(mbl.z_values);
|