STM32F746G-DISCO Touchscreen gestureId issues
Hi,
I'm working on a project which needs to get the gesture of the user on the touchscreen.
Apparently the "BSP_TS_GetState(TS_StateTypeDef *TS_State)" function fills a structure of TS_StateTypeDef type.
typedef struct
{
uint8_t touchDetected;
uint16_t touchX[TS_MAX_NB_TOUCH];
uint16_t touchY[TS_MAX_NB_TOUCH];
#if (TS_MULTI_TOUCH_SUPPORTED == 1)
uint8_t touchWeight[TS_MAX_NB_TOUCH];
uint8_t touchEventId[TS_MAX_NB_TOUCH];
uint8_t touchArea[TS_MAX_NB_TOUCH];
uint32_t gestureId;
#endif
} TS_StateTypeDef;The TS_StateTypeDef contains the gestureId variable which takes the value of type @ref TS_GestureIdTypeDef. (GEST_ID_MOVE_UP, GEST_ID_MOVE_DOWN...)
typedef enum
{
GEST_ID_NO_GESTURE = 0x00, /*!< Gesture not defined / recognized */
GEST_ID_MOVE_UP = 0x01, /*!< Gesture Move Up */
GEST_ID_MOVE_RIGHT = 0x02, /*!< Gesture Move Right */
GEST_ID_MOVE_DOWN = 0x03, /*!< Gesture Move Down */
GEST_ID_MOVE_LEFT = 0x04, /*!< Gesture Move Left */
GEST_ID_ZOOM_IN = 0x05, /*!< Gesture Zoom In */
GEST_ID_ZOOM_OUT = 0x06, /*!< Gesture Zoom Out */
GEST_ID_NB_MAX = 0x07 /*!< max number of gesture id */
} TS_GestureIdTypeDef;So in my program i wrote :
//The full code is way more complicated, this part is just the problematic part
TS_StateTypeDef TS_Status; //My structure which will contain all the Touchscreen Datas
char buffer[50];//Text buffer
int main(void)
{
//Fill the TS_Status structure with the Touchscreen datas
BSP_TS_GetState(&TS_Status);
//Display on the LCD the TS_Status.gestureId Variable
sprintf(buffer, "%d", TS_Status.gestureId);
BSP_LCD_DisplayStringAt(0, LINE(0), &buffer, LEFT_MODE);
}The problem is that BSP_TS_GetState(&TS_Status) always returns TS_Status.gestureId at 0, even if i move my finger up, down, left...
I already tried with the BSP_TS_Get_GestureId(&TS_State) function, same problem...
Thank you for your help,
Mathieu.
