Hello,
I hope this is the right place for my topic.
We are evaluating the use of emWIN (precompiled library version downloaded from LPCWARE) on our target (NXP LPC1788 with 7 inches LCD and resistive touchscreen).
The custom configuration of our display and touch screen went ok (we use builtin analog touch screen driver), but we have troubles with touchscreen events... I mean sometimes, not ever, when there is a new touch event on the screen it seems that the emWIN windows manager recognize a touch event in the last place when there has been the last touch before the current one.
For example, let's suppose there are 2 buttons on the screen, when I permanently touch button 1 it is correctly drawn pushed by windows manager. After the button 1 is released, and I push button 2, there is at first a "glitch" that before pressing as expected button 2, hits again button 1 for only a small period of time.
I suppose that I miss some update of the event related to the touchscreen...
Below there is an extract of our LCDConf.c where function ExecTouch() is called every 10ms as suggested on documentation.
[b]
TP_GetTouchData(&pos), as name explains, return 1 if there is a touch event on the screen. In this case _TouchX and _TouchY are updated
by new values returned by TP_GetTouchData(&pos). _TouchX and _TouchY are in turn the global values retuned by GUI_TOUCH_X_MeasureX and
GUI_TOUCH_X_MeasureY functions.
...
void ExecTouch(void)
{
GUI_PID_STATE State;
st_TP_Coordinates pos;
if (_IsInited == 0) {
return;
}
if ( 1 == TP_GetTouchData(&pos) )
{
_PenIsDown = 1;
_TouchX = pos.x;
_TouchY = pos.y;
GUI_TOUCH_Exec();
}
else if (_PenIsDown)
{
//
// No further touch event after at least one touch event means we have
// lift the pen from the touchscreen.
//
_PenIsDown = 0;
GUI_PID_GetState(&State);
State.x = 0;
State.y = 0;
State.Pressed = 0;
GUI_PID_StoreState(&State);
}
}[/b]
...
We have debugged the code and every touch recognized by low level touchscreen driver has correct x and y position... maybe some wrong issue about FIFO events pushed by our driver and processed by window manager?
Have you any hints about this behavior?
Than you in advance.
I hope this is the right place for my topic.
We are evaluating the use of emWIN (precompiled library version downloaded from LPCWARE) on our target (NXP LPC1788 with 7 inches LCD and resistive touchscreen).
The custom configuration of our display and touch screen went ok (we use builtin analog touch screen driver), but we have troubles with touchscreen events... I mean sometimes, not ever, when there is a new touch event on the screen it seems that the emWIN windows manager recognize a touch event in the last place when there has been the last touch before the current one.
For example, let's suppose there are 2 buttons on the screen, when I permanently touch button 1 it is correctly drawn pushed by windows manager. After the button 1 is released, and I push button 2, there is at first a "glitch" that before pressing as expected button 2, hits again button 1 for only a small period of time.
I suppose that I miss some update of the event related to the touchscreen...
Below there is an extract of our LCDConf.c where function ExecTouch() is called every 10ms as suggested on documentation.
[b]
TP_GetTouchData(&pos), as name explains, return 1 if there is a touch event on the screen. In this case _TouchX and _TouchY are updated
by new values returned by TP_GetTouchData(&pos). _TouchX and _TouchY are in turn the global values retuned by GUI_TOUCH_X_MeasureX and
GUI_TOUCH_X_MeasureY functions.
...
void ExecTouch(void)
{
GUI_PID_STATE State;
st_TP_Coordinates pos;
if (_IsInited == 0) {
return;
}
if ( 1 == TP_GetTouchData(&pos) )
{
_PenIsDown = 1;
_TouchX = pos.x;
_TouchY = pos.y;
GUI_TOUCH_Exec();
}
else if (_PenIsDown)
{
//
// No further touch event after at least one touch event means we have
// lift the pen from the touchscreen.
//
_PenIsDown = 0;
GUI_PID_GetState(&State);
State.x = 0;
State.y = 0;
State.Pressed = 0;
GUI_PID_StoreState(&State);
}
}[/b]
...
We have debugged the code and every touch recognized by low level touchscreen driver has correct x and y position... maybe some wrong issue about FIFO events pushed by our driver and processed by window manager?
Have you any hints about this behavior?
Than you in advance.