GUIslice: Problem compiling ESP32 + TFT_eSPI + FT6206

Hello,

I tried to find other people that had the same issue but no luck. I’m trying to use the library with a huzzah32 (ESP32) using the TFT_eSPI library and the FT6206 capacitive library. I have the 2.8" TFT LCD with Cap Touch.

But I can not get it to compile, it gives me the error: lib/GUIslice/src/GUIslice_drv_tft_espi.cpp:822:21: error: 'class TFT_eSPI' has no member named 'getTouch'

I got the TFT_eSPI working before, so I know that my configuration is OK under the “User_Setup.h”

Even if I try to disable touch on “GUIslice_config_ard.h” the error still persists. It’s always trying to include and compile this section of code inside the GUIslice_drv_tft_espi.cpp


/ Confirm that TOUCH_CS has been defined otherwise the
// m_disp.getTouch() call won't be defined in TFT_eSPI
#if defined(DRV_TOUCH_TFT_ESPI)
  #if !defined(TOUCH_CS)
    #error "To use DRV_TOUCH_TFT_ESPI, TOUCH_CS needs to be defined in TFT_eSPI User_Setup"
  #endif
#endif

bool gslc_DrvGetTouch(gslc_tsGui* pGui,int16_t* pnX, int16_t* pnY, uint16_t* pnPress)
{

  if ((pGui == NULL) || (pGui->pvDriver == NULL)) {
    GSLC_DEBUG_PRINT("ERROR: DrvGetTouch(%s) called with NULL ptr\n","");
    return false;
  }

  // Use TFT_eSPI for touch events
  uint8_t     bPressed = 0;
  uint16_t    nX=0;
  uint16_t    nY=0;
  int16_t     nOutputX, nOutputY;

  bPressed = m_disp.getTouch(&nX,&nY);

  // Perform any requested swapping of input axes
  if( pGui->nSwapXY ) {
    nOutputX = (int16_t)nY;
    nOutputY = (int16_t)nX;
  } else {
    nOutputX = (int16_t)nX;
    nOutputY = (int16_t)nY;
  }

  // Perform any requested output axis flipping
  if( pGui->nFlipX ) {
    nOutputX = pGui->nDispW - 1 - nOutputX;
  }
  if( pGui->nFlipY ) {
    nOutputY = pGui->nDispH - 1 - nOutputY;
  }

  // Assign coordinates
  *pnX = (int16_t)nOutputX;
  *pnY = (int16_t)nOutputY;

  if (bPressed > 0) {
    *pnPress = 1;
  } else {
    *pnPress = 0;
  }

  return true;
}

It’s very likely that I’m missing something, could you give a hint?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I’m not home so I cant really tell if this was the latest code that I had, I got the files from my dropbox.

I know that I had to correct the orientation for the capacitive screen to get things properly working. Also my screen is different than yours, I’m using the 2.8 capacitive one.

config.zip