added FT6206 flip
This commit is contained in:
@@ -268,6 +268,7 @@ void prepButtons(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(TOUCH_CS)
|
||||
void touch_calibrate()
|
||||
{
|
||||
uint16_t calData[5];
|
||||
@@ -300,6 +301,7 @@ void touch_calibrate()
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
void updateGUIButtons(void)
|
||||
{
|
||||
@@ -355,8 +357,8 @@ void updateGUIButtons(void)
|
||||
// -------------------------------------------------------------------------
|
||||
void initTouchScreen(void)
|
||||
{
|
||||
ts.begin();
|
||||
if (!ts.begin(40))
|
||||
//ts.begin();
|
||||
if (!ts.begin(tft.width(), tft.height(), true, 40))
|
||||
{
|
||||
Serial.println("Unable to start touchscreen.");
|
||||
}
|
||||
@@ -370,12 +372,14 @@ void initLCD(void)
|
||||
{
|
||||
tft.init();
|
||||
|
||||
tft.setRotation(2);
|
||||
tft.setRotation(TFT_ROTATION);
|
||||
tft.setTextFont(2);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.invertDisplay(false);
|
||||
#if defined(TOUCH_CS)
|
||||
//touch_calibrate();
|
||||
tft.setTouch(calData);
|
||||
#endif
|
||||
|
||||
initTouchScreen();
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGT 320
|
||||
#define TFT_DEFAULT_R 4
|
||||
#define TFT_ROTATION 0 //2 = upsidedown
|
||||
|
||||
#define LCD_INTERVAL 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user