Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extrapolation of unprobed points for kinetic and bilinear bed leveling #24107

Merged
merged 2 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Marlin/src/feature/bedlevel/abl/bbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "../../../inc/MarlinConfigPre.h"

class LevelingBilinear {
private:
static xy_pos_t grid_spacing, grid_start;
static xy_float_t grid_factor;
static bed_mesh_t z_values;
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ G29_TYPE GcodeSuite::G29() {
// Can't re-enable (on error) until the new grid is written
abl.reenable = false;
}

// Pre-populate local Z values from the stored mesh
TERN_(IS_KINEMATIC, COPY(abl.z_values, Z_VALUES_ARR));

#endif // AUTO_BED_LEVELING_BILINEAR

} // !g29_in_progress
Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void DGUSScreenHandler::StoreSettings(char *buff) {
data.initialized = true;
data.volume = dgus_display.GetVolume();
data.brightness = dgus_display.GetBrightness();
data.abl = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());
data.abl_okay = (ExtUI::getLevelingActive() && ExtUI::getMeshValid());

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

if (data.initialized) {
leveling_active = (data.abl && ExtUI::getMeshValid());

leveling_active = (data.abl_okay && ExtUI::getMeshValid());
ExtUI::setLevelingActive(leveling_active);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class DGUSScreenHandler {
bool initialized;
uint8_t volume;
uint8_t brightness;
bool abl;
bool abl_okay;
} eeprom_data_t;
};

Expand Down