🎨 ExtUI "user click" and other tweaks (#22122)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
InsanityAutomation
2021-06-13 23:08:46 -04:00
committed by Scott Lahteine
parent 56355159c6
commit d84e2d6e29
8 changed files with 125 additions and 103 deletions

View File

@ -70,7 +70,7 @@ void GcodeSuite::G29() {
return;
}
int8_t ix, iy;
int8_t ix, iy = 0;
switch (state) {
case MeshReport:
@ -88,6 +88,7 @@ void GcodeSuite::G29() {
mbl_probe_index = 0;
if (!ui.wait_for_move) {
queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : PSTR("G29S2"));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
return;
}
state = MeshNext;
@ -109,6 +110,7 @@ void GcodeSuite::G29() {
else {
// Save Z for the previous mesh position
mbl.set_zigzag_z(mbl_probe_index - 1, current_position.z);
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
SET_SOFT_ENDSTOP_LOOSE(false);
}
// If there's another point to sample, move there with optional lift.