Question
Touch GFX and touch api issue
Hi,
i'm trying to use a touchgfx with a capacitive touch. I have wrote a simple demo example. During the simulation i can switch an on / off a switch button just clicking with the mouse on it.
In my hw integration i'm using the sampleTouch to give the coords to the library. I have checked the coords and they are right but i didn't see any effect on the screen element. it seems that the touch event is not properly caught by the library.
Thank you
BR
bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)
{
/**
* By default sampleTouch returns false,
* return true if a touch has been detected, otherwise false.
*
* Coordinates are passed to the caller by reference by x and y.
*
* This function is called by the TouchGFX framework.
* By default sampleTouch is called every tick, this can be adjusted by HAL::setTouchSampleRate(int8_t);
*
*/
key_Data_t key_Data;
if (cb_pop(&key_Data_CircBuff,(void*) &key_Data))
{
x = (int32_t) key_Data.x;
y = (int32_t) key_Data.y;
return true;
}
return false;
}