Convert UBL mesh tilting to all use the same algorithm (#9204)
A number of regressions were patched also. The UBL G29 P2 and P4 Press and Hold had stopped working. It is very possible this is broken in the bugfix_v1.1.x branch also. The main purpose of the Pull Request is to get the 3-Point mesh tilting to use the LSF algorithm just like the grid based mesh tilt. This simplifies the logic and reduces the code size some what. But the real reason to do it is the 3-Point case can be solved exactly. And by feeding these numbers into the LSF algorithm it provides a way to check all that code for 'correctness'.
This commit is contained in:
@ -165,7 +165,7 @@ int8_t g26_prime_flag;
|
||||
if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
|
||||
lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
|
||||
#if ENABLED(ULTIPANEL)
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
#endif
|
||||
wait_for_release();
|
||||
return true;
|
||||
@ -421,7 +421,7 @@ inline bool turn_on_heaters() {
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
if (g26_bed_temp > 25) {
|
||||
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
lcd_external_control = true;
|
||||
#endif
|
||||
thermalManager.setTargetBed(g26_bed_temp);
|
||||
@ -441,7 +441,7 @@ inline bool turn_on_heaters() {
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
}
|
||||
lcd_setstatusPGM(PSTR("G26 Heating Nozzle."), 99);
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -463,7 +463,7 @@ inline bool turn_on_heaters() {
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
lcd_reset_status();
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
#endif
|
||||
|
||||
return G26_OK;
|
||||
@ -509,7 +509,7 @@ inline bool prime_nozzle() {
|
||||
strcpy_P(lcd_status_message, PSTR("Done Priming")); // We can't do lcd_setstatusPGM() without having it continue;
|
||||
// So... We cheat to get a message up.
|
||||
lcd_setstatusPGM(PSTR("Done Priming"), 99);
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
lcd_external_control = false;
|
||||
}
|
||||
else
|
||||
@ -517,7 +517,7 @@ inline bool prime_nozzle() {
|
||||
{
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
|
||||
lcd_quick_feedback();
|
||||
lcd_quick_feedback(true);
|
||||
#endif
|
||||
set_destination_from_current();
|
||||
destination[E_AXIS] += g26_prime_length;
|
||||
@ -680,9 +680,12 @@ void GcodeSuite::G26() {
|
||||
set_bed_leveling_enabled(!parser.seen('D'));
|
||||
|
||||
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
|
||||
SERIAL_PROTOCOLLNPGM("! move nozzle to Z_CLEARANCE_BETWEEN_PROBES height.");
|
||||
SERIAL_ECHOLNPAIR(" Z at:", current_position[Z_AXIS]);
|
||||
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
|
||||
stepper.synchronize();
|
||||
set_current_from_destination();
|
||||
SERIAL_ECHOLNPAIR(" Z now at:", current_position[Z_AXIS]);
|
||||
}
|
||||
|
||||
if (turn_on_heaters() != G26_OK) goto LEAVE;
|
||||
@ -708,8 +711,14 @@ void GcodeSuite::G26() {
|
||||
|
||||
// Move nozzle to the specified height for the first layer
|
||||
set_destination_from_current();
|
||||
SERIAL_PROTOCOLLNPGM("! moving nozzle to 1st layer height.");
|
||||
SERIAL_ECHOLNPAIR(" Z1 at:", current_position[Z_AXIS]);
|
||||
|
||||
destination[Z_AXIS] = g26_layer_height;
|
||||
move_to(destination, 0.0);
|
||||
stepper.synchronize();
|
||||
set_destination_from_current();
|
||||
SERIAL_ECHOLNPAIR(" Z2 at:", current_position[Z_AXIS]);
|
||||
move_to(destination, g26_ooze_amount);
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
Reference in New Issue
Block a user