Regression fixes for UBL's G29 P1, G29 P2, G29 P4 and G26 (#9213)
The changes to ultralcd.cpp for is_lcd_clicked() did not encompass the full functionality of UBL's G29 P1, P2 and P4. It also broke G26's ability to abort in several of its phases. This is the first pass at fixing the problem. It has been tested for correctness for several hours but more testing needs to be done. There may be a few follow up patches to finish covering all the corner cases, but right now I need to merge this before any conflicts show up. Some of these changes will need to be moved over to the bugfix-v2.0.0 branch. That will happen a few days from now.
This commit is contained in:
parent
333bd8f394
commit
c11665e92f
7 changed files with 70 additions and 58 deletions
|
|
@ -766,9 +766,10 @@ 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!
|
||||
|
|
@ -4664,8 +4665,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)) {
|
||||
|
|
@ -4933,7 +4934,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue