Rotary encoder cleanup (#20753)

This commit is contained in:
Scott Lahteine
2021-01-12 20:43:52 -06:00
committed by GitHub
parent 2b928b4754
commit 4a89731025
30 changed files with 484 additions and 438 deletions

View File

@ -31,7 +31,8 @@ XPT2046 touchIO;
#include "../tft_io/touch_calibration.h"
#endif
#include "../marlinui.h" // For EN_C bit mask
#include "../buttons.h" // For EN_C bit mask
#include "../marlinui.h" // For ui.refresh
#include "../tft_io/tft_io.h"
#define DOGM_AREA_LEFT TFT_PIXEL_OFFSET_X
@ -66,7 +67,6 @@ uint8_t TouchButtons::read_buttons() {
y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
#endif
// Touch within the button area simulates an encoder button
if (y > BUTTON_AREA_TOP && y < BUTTON_AREA_BOT)
return WITHIN(x, BUTTOND_X_LO, BUTTOND_X_HI) ? EN_D