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:
@ -774,9 +774,12 @@ void kill_screen(const char* lcd_msg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void lcd_quick_feedback() {
|
||||
void lcd_quick_feedback(const bool clear_buttons) {
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
buttons = 0;
|
||||
|
||||
if (clear_buttons)
|
||||
buttons = 0;
|
||||
|
||||
next_button_update_ms = millis() + 500;
|
||||
|
||||
// Buzz and wait. The delay is needed for buttons to settle!
|
||||
@ -4672,8 +4675,8 @@ void kill_screen(const char* lcd_msg) {
|
||||
if (encoderDirection == -1) { // side effect which signals we are inside a menu
|
||||
if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN) encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM;
|
||||
else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_UP) encoderPosition += ENCODER_STEPS_PER_MENU_ITEM;
|
||||
else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_LEFT) { menu_action_back(); lcd_quick_feedback(); }
|
||||
else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT) { lcd_return_to_status(); lcd_quick_feedback(); }
|
||||
else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_LEFT) { menu_action_back(); lcd_quick_feedback(true); }
|
||||
else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT) { lcd_return_to_status(); lcd_quick_feedback(true); }
|
||||
}
|
||||
else {
|
||||
if (buttons_reprapworld_keypad & (EN_REPRAPWORLD_KEYPAD_DOWN|EN_REPRAPWORLD_KEYPAD_UP|EN_REPRAPWORLD_KEYPAD_RIGHT)) {
|
||||
@ -4941,7 +4944,7 @@ void lcd_update() {
|
||||
wait_for_unclick = true; // Set debounce flag to ignore continous clicks
|
||||
lcd_clicked = !wait_for_user && !no_reentry; // Keep the click if not waiting for a user-click
|
||||
wait_for_user = false; // Any click clears wait for user
|
||||
lcd_quick_feedback(); // Always make a click sound
|
||||
lcd_quick_feedback(true); // Always make a click sound
|
||||
}
|
||||
}
|
||||
else wait_for_unclick = false;
|
||||
|
@ -116,7 +116,7 @@
|
||||
|
||||
extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
||||
void lcd_buttons_update();
|
||||
void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
|
||||
void lcd_quick_feedback(const bool clear_buttons); // Audible feedback for a button click - could also be visual
|
||||
void lcd_completion_feedback(const bool good=true);
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
Reference in New Issue
Block a user