Alexander Gavrilenko
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
5 deletions
-
Marlin/src/lcd/ultralcd.cpp
|
|
@ -777,13 +777,12 @@ void MarlinUI::update() { |
|
|
|
static bool wait_for_unclick; // = false
|
|
|
|
|
|
|
|
#if ENABLED(TOUCH_BUTTONS) |
|
|
|
|
|
|
|
if (touch_buttons) { |
|
|
|
RESET_STATUS_TIMEOUT(); |
|
|
|
if (buttons & (EN_A | EN_B)) { // Menu arrows, in priority
|
|
|
|
if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority
|
|
|
|
if (ELAPSED(ms, next_button_update_ms)) { |
|
|
|
encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * (ENCODER_PULSES_PER_STEP) * encoderDirection; |
|
|
|
if (buttons & EN_A) encoderDiff *= -1; |
|
|
|
if (touch_buttons & EN_A) encoderDiff *= -1; |
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) |
|
|
|
if (external_control) ubl.encoder_diff = encoderDiff; |
|
|
|
#endif |
|
|
@ -1246,7 +1245,11 @@ void MarlinUI::update() { |
|
|
|
| slow_buttons |
|
|
|
#endif |
|
|
|
#if ENABLED(TOUCH_BUTTONS) && HAS_ENCODER_ACTION |
|
|
|
| touch_buttons |
|
|
|
| (touch_buttons |
|
|
|
#if HAS_ENCODER_WHEEL |
|
|
|
& (~(EN_A | EN_B)) |
|
|
|
#endif |
|
|
|
) |
|
|
|
#endif |
|
|
|
); |
|
|
|
|
|
|
@ -1277,7 +1280,7 @@ void MarlinUI::update() { |
|
|
|
|
|
|
|
} // next_button_update_ms
|
|
|
|
|
|
|
|
#if HAS_ENCODER_WHEEL && DISABLED(TOUCH_BUTTONS) |
|
|
|
#if HAS_ENCODER_WHEEL |
|
|
|
static uint8_t lastEncoderBits; |
|
|
|
|
|
|
|
#define encrot0 0 |
|
|
|