Skip to content

Commit 60b6df4

Browse files
authored
🐛 Fix kinetic ABL mesh after refactor (MarlinFirmware#24107)
Followup to MarlinFirmware#23868
1 parent e633ef8 commit 60b6df4

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Marlin/src/feature/bedlevel/abl/bbl.h

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "../../../inc/MarlinConfigPre.h"
2525

2626
class LevelingBilinear {
27+
private:
2728
static xy_pos_t grid_spacing, grid_start;
2829
static xy_float_t grid_factor;
2930
static bed_mesh_t z_values;

Marlin/src/gcode/bedlevel/abl/G29.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ G29_TYPE GcodeSuite::G29() {
507507
// Can't re-enable (on error) until the new grid is written
508508
abl.reenable = false;
509509
}
510+
511+
// Pre-populate local Z values from the stored mesh
512+
TERN_(IS_KINEMATIC, COPY(abl.z_values, Z_VALUES_ARR));
513+
510514
#endif // AUTO_BED_LEVELING_BILINEAR
511515

512516
} // !g29_in_progress

Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void DGUSScreenHandler::StoreSettings(char *buff) {
200200
data.initialized = true;
201201
data.volume = dgus_display.GetVolume();
202202
data.brightness = dgus_display.GetBrightness();
203-
data.abl = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());
203+
data.abl_okay = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());
204204

205205
memcpy(buff, &data, sizeof(data));
206206
}
@@ -216,8 +216,7 @@ void DGUSScreenHandler::LoadSettings(const char *buff) {
216216
dgus_display.SetBrightness(data.initialized ? data.brightness : DGUS_DEFAULT_BRIGHTNESS);
217217

218218
if (data.initialized) {
219-
leveling_active = (data.abl && ExtUI::getMeshValid());
220-
219+
leveling_active = (data.abl_okay && ExtUI::getMeshValid());
221220
ExtUI::setLevelingActive(leveling_active);
222221
}
223222
}

Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class DGUSScreenHandler {
134134
bool initialized;
135135
uint8_t volume;
136136
uint8_t brightness;
137-
bool abl;
137+
bool abl_okay;
138138
} eeprom_data_t;
139139
};
140140

0 commit comments

Comments
 (0)