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

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

507
         // Can't re-enable (on error) until the new grid is written
507
         // Can't re-enable (on error) until the new grid is written
508
         abl.reenable = false;
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
     #endif // AUTO_BED_LEVELING_BILINEAR
514
     #endif // AUTO_BED_LEVELING_BILINEAR
511
 
515
 
512
   } // !g29_in_progress
516
   } // !g29_in_progress

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

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

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

134
     bool initialized;
134
     bool initialized;
135
     uint8_t volume;
135
     uint8_t volume;
136
     uint8_t brightness;
136
     uint8_t brightness;
137
-    bool abl;
137
+    bool abl_okay;
138
   } eeprom_data_t;
138
   } eeprom_data_t;
139
 };
139
 };
140
 
140
 

Loading…
Cancel
Save