TFT followup fixes (#19710)
This commit is contained in:
parent
da79674f84
commit
2132efa981
|
@ -474,7 +474,8 @@ void lv_encoder_pin_init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static uint8_t buttons = newbutton;
|
static uint8_t buttons = 0;
|
||||||
|
buttons = newbutton;
|
||||||
static uint8_t lastEncoderBits;
|
static uint8_t lastEncoderBits;
|
||||||
|
|
||||||
#define encrot0 0
|
#define encrot0 0
|
||||||
|
|
|
@ -295,10 +295,6 @@ bool Touch::get_point(int16_t *x, int16_t *y) {
|
||||||
if (is_touched && calibration.orientation != TOUCH_ORIENTATION_NONE) {
|
if (is_touched && calibration.orientation != TOUCH_ORIENTATION_NONE) {
|
||||||
*x = int16_t((int32_t(*x) * calibration.x) >> 16) + calibration.offset_x;
|
*x = int16_t((int32_t(*x) * calibration.x) >> 16) + calibration.offset_x;
|
||||||
*y = int16_t((int32_t(*y) * calibration.y) >> 16) + calibration.offset_y;
|
*y = int16_t((int32_t(*y) * calibration.y) >> 16) + calibration.offset_y;
|
||||||
#if (TFT_ROTATION & TFT_ROTATE_180)
|
|
||||||
*x = TFT_WIDTH - *x;
|
|
||||||
*y = TFT_HEIGHT - *y;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return is_touched;
|
return is_touched;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,11 @@
|
||||||
#define ILI9328_GATE_SCANCTL1_DATA 0x2700
|
#define ILI9328_GATE_SCANCTL1_DATA 0x2700
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \
|
/*
|
||||||
// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \
|
#define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \
|
||||||
// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0)
|
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \
|
||||||
|
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0)
|
||||||
|
*/
|
||||||
|
|
||||||
#define ILI9328_ETMOD_ORIENTATION (ILI9328_ETMOD_AM | ILI9328_ETMOD_ID1 | ILI9328_ETMOD_ID0)
|
#define ILI9328_ETMOD_ORIENTATION (ILI9328_ETMOD_AM | ILI9328_ETMOD_ID1 | ILI9328_ETMOD_ID0)
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,11 @@
|
||||||
#define R61505_DRVCTRL_DATA 0x2700
|
#define R61505_DRVCTRL_DATA 0x2700
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \
|
/*
|
||||||
// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \
|
#define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \
|
||||||
// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1)
|
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \
|
||||||
|
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1)
|
||||||
|
*/
|
||||||
|
|
||||||
#define R61505_ETMOD_ORIENTATION (R61505_ETMOD_AM | R61505_ETMOD_ID0 | R61505_ETMOD_ID1)
|
#define R61505_ETMOD_ORIENTATION (R61505_ETMOD_AM | R61505_ETMOD_ID0 | R61505_ETMOD_ID1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue