LVGL and Classic UI for STM32 (#20552)

This commit is contained in:
Victor Oliveira
2020-12-23 23:01:21 -03:00
committed by GitHub
parent f8c6de0cdc
commit 4d6b6bcffc
22 changed files with 113 additions and 133 deletions

View File

@ -32,6 +32,7 @@ XPT2046 touchIO;
#endif
#include "../marlinui.h" // For EN_C bit mask
#include "../tft_io/tft_io.h"
#define DOGM_AREA_LEFT TFT_PIXEL_OFFSET_X
#define DOGM_AREA_TOP TFT_PIXEL_OFFSET_Y
@ -49,7 +50,8 @@ uint8_t TouchButtons::read_buttons() {
#ifdef HAS_WIRED_LCD
int16_t x, y;
if (!touchIO.getRawPoint(&x, &y)) return 0;
const bool is_touched = (TERN(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration.orientation, TOUCH_ORIENTATION) == TOUCH_PORTRAIT ? touchIO.getRawPoint(&y, &x) : touchIO.getRawPoint(&x, &y));
if (!is_touched) return 0;
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
const calibrationState state = touch_calibration.get_calibration_state();