Browse Source

🐛 Fix kinetic ABL mesh after refactor (#24107)

Followup to #23868
tombrazier 2 years ago
parent
commit
60b6df4542
No account linked to committer's email address

+ 1
- 0
Marlin/src/feature/bedlevel/abl/bbl.h View File

@@ -24,6 +24,7 @@
24 24
 #include "../../../inc/MarlinConfigPre.h"
25 25
 
26 26
 class LevelingBilinear {
27
+private:
27 28
   static xy_pos_t grid_spacing, grid_start;
28 29
   static xy_float_t grid_factor;
29 30
   static bed_mesh_t z_values;

+ 4
- 0
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -507,6 +507,10 @@ G29_TYPE GcodeSuite::G29() {
507 507
         // Can't re-enable (on error) until the new grid is written
508 508
         abl.reenable = false;
509 509
       }
510
+
511
+      // Pre-populate local Z values from the stored mesh
512
+      TERN_(IS_KINEMATIC, COPY(abl.z_values, Z_VALUES_ARR));
513
+
510 514
     #endif // AUTO_BED_LEVELING_BILINEAR
511 515
 
512 516
   } // !g29_in_progress

+ 2
- 3
Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp View File

@@ -200,7 +200,7 @@ void DGUSScreenHandler::StoreSettings(char *buff) {
200 200
   data.initialized = true;
201 201
   data.volume = dgus_display.GetVolume();
202 202
   data.brightness = dgus_display.GetBrightness();
203
-  data.abl = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());
203
+  data.abl_okay = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());
204 204
 
205 205
   memcpy(buff, &data, sizeof(data));
206 206
 }
@@ -216,8 +216,7 @@ void DGUSScreenHandler::LoadSettings(const char *buff) {
216 216
   dgus_display.SetBrightness(data.initialized ? data.brightness : DGUS_DEFAULT_BRIGHTNESS);
217 217
 
218 218
   if (data.initialized) {
219
-    leveling_active = (data.abl && ExtUI::getMeshValid());
220
-
219
+    leveling_active = (data.abl_okay && ExtUI::getMeshValid());
221 220
     ExtUI::setLevelingActive(leveling_active);
222 221
   }
223 222
 }

+ 1
- 1
Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h View File

@@ -134,7 +134,7 @@ private:
134 134
     bool initialized;
135 135
     uint8_t volume;
136 136
     uint8_t brightness;
137
-    bool abl;
137
+    bool abl_okay;
138 138
   } eeprom_data_t;
139 139
 };
140 140
 

Loading…
Cancel
Save