|
@@ -4590,14 +4590,20 @@ void lcd_update() {
|
4590
|
4590
|
|
4591
|
4591
|
#if ENABLED(ULTIPANEL)
|
4592
|
4592
|
static millis_t return_to_status_ms = 0;
|
|
4593
|
+
|
|
4594
|
+ // Handle any queued Move Axis motion
|
4593
|
4595
|
manage_manual_move();
|
4594
|
4596
|
|
|
4597
|
+ // Update button states for LCD_CLICKED, etc.
|
|
4598
|
+ // After state changes the next button update
|
|
4599
|
+ // may be delayed 300-500ms.
|
4595
|
4600
|
lcd_buttons_update();
|
4596
|
4601
|
|
4597
|
4602
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
4598
|
|
- const bool UBL_CONDITION = !ubl.has_control_of_lcd_panel;
|
|
4603
|
+ // Don't run the debouncer if UBL owns the display
|
|
4604
|
+ #define UBL_CONDITION !ubl.has_control_of_lcd_panel
|
4599
|
4605
|
#else
|
4600
|
|
- constexpr bool UBL_CONDITION = true;
|
|
4606
|
+ #define UBL_CONDITION true
|
4601
|
4607
|
#endif
|
4602
|
4608
|
|
4603
|
4609
|
// If the action button is pressed...
|
|
@@ -4944,7 +4950,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
4944
|
4950
|
*/
|
4945
|
4951
|
void lcd_buttons_update() {
|
4946
|
4952
|
static uint8_t lastEncoderBits;
|
4947
|
|
- millis_t now = millis();
|
|
4953
|
+ const millis_t now = millis();
|
4948
|
4954
|
if (ELAPSED(now, next_button_update_ms)) {
|
4949
|
4955
|
|
4950
|
4956
|
#if ENABLED(NEWPANEL)
|
|
@@ -4962,9 +4968,16 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
4962
|
4968
|
if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
|
4963
|
4969
|
#endif
|
4964
|
4970
|
|
|
4971
|
+ buttons = newbutton;
|
|
4972
|
+ #if ENABLED(LCD_HAS_SLOW_BUTTONS)
|
|
4973
|
+ buttons |= slow_buttons;
|
|
4974
|
+ #endif
|
|
4975
|
+
|
|
4976
|
+ //
|
|
4977
|
+ // Directional buttons
|
|
4978
|
+ //
|
4965
|
4979
|
#if LCD_HAS_DIRECTIONAL_BUTTONS
|
4966
|
4980
|
|
4967
|
|
- // Manage directional buttons
|
4968
|
4981
|
#if ENABLED(REVERSE_MENU_DIRECTION)
|
4969
|
4982
|
#define _ENCODER_UD_STEPS (ENCODER_STEPS_PER_MENU_ITEM * encoderDirection)
|
4970
|
4983
|
#else
|
|
@@ -5008,11 +5021,6 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
5008
|
5021
|
|
5009
|
5022
|
#endif // LCD_HAS_DIRECTIONAL_BUTTONS
|
5010
|
5023
|
|
5011
|
|
- buttons = newbutton;
|
5012
|
|
- #if ENABLED(LCD_HAS_SLOW_BUTTONS)
|
5013
|
|
- buttons |= slow_buttons;
|
5014
|
|
- #endif
|
5015
|
|
-
|
5016
|
5024
|
#if ENABLED(ADC_KEYPAD)
|
5017
|
5025
|
|
5018
|
5026
|
uint8_t newbutton_reprapworld_keypad = 0;
|