90 views
in GUI Development by

Hi, EW team:

      For example, my screen has 2 slides for left and right side users. The 2 slides are required to support simultaneous operation. If  2 fingers are not captured  in one touch event cycle, the 2 slides work well. Otherwise neither of them is operational.

     The scenario is OK with EW studio simulation. So I guess the issue is caused by either the difference between generated code and prototype environment, or how the touch events are fed to EwProcess().

     When the 2 fingers are captured at the same time, the variable noOfEvents = 2, and 2 events with state EW_BSP_TOUCH_DOWN are fed to EwProcess().

     Sorry that the issue might have been caused by control transfer between touch handlers.

     Thank you.

 

Best regards.

Stephen

2 Answers

0 votes
by

Hi:

   I have added a trace into the OnStart slot of both SlideTouchHandlers. In simulation of EW studio, double touches on both slides at the same moment always produce double traces. But when running on board, the observation is much more confusing.

  Below is one confusing log. [RAW] came from C code, and was printed out whenever touchCount from driver changed. Here, touchCount changed from 0 to 2, which meaned 2 fingers were captured in one event cycle. But 2 traces followed, and the both slides captured double touches, and worked.

[RAW]:touchCount=2
[RAW]:touchArray: valid = 1, touchID = 0
[RAW]:touchArray: valid = 1, touchID = 1
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
trace: "Slide Touched"
trace: "Slide Touched"

 The second log showed that 2 fingers were not captured in one event cycle, but no traces were produced, so neither of the slides was activated. 

[RAW]:touchCount=0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchCount=1
[RAW]:touchArray: valid = 1, touchID = 1
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchCount=2
[RAW]:touchArray: valid = 1, touchID = 0
[RAW]:touchArray: valid = 1, touchID = 1
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchCount=1
[RAW]:touchArray: valid = 1, touchID = 1
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchArray: valid = 0, touchID = 15
[RAW]:touchCount=0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0
[RAW]:touchArray: valid = 0, touchID = 0

 

So I think the difference between simulation environment of EW Studio and generated code causes this issue.

 

Best regards

Stephen

by
Hi:

     Here is another log printing the events fed to EwProcess().

     It shows that 2 fingers were captured in one event cycle and then left screen.

[EVENT]:noOfEvents=2    <TouchEvent: Finger = 0, State = 1>     <TouchEvent: Finger = 1, State = 1>
trace: "Slide Touched"
trace: "Slide Touched"
[EVENT]:noOfEvents=0
[EVENT]:noOfEvents=2    <TouchEvent: Finger = 0, State = 3>     <TouchEvent: Finger = 1, State = 3>
[EVENT]:noOfEvents=0
 

Best regards.

Stephen
0 votes
by

Hello Stephen,

there are two macros in ewconfig.h that can be enabled to check the touch coordinates:

EW_PRINT_TOUCH_DATA - This macro prints all touch data reported by the touch driver on the console. This is helpful to test and calibrate the touch device.

EW_PRINT_TOUCH_EVENTS - This macro prints all touch events that are provided to the GUI application. This macro is important for testing during development: Every touch cycle for each finger has to start with one DOWN event followed by 0...n MOVE events and it has to be finalized with one UP event. This sequence is essential and mandatory to provide touch events to the GUI application.

Otherwise your GUI application will behave different between Prototyper and target.

Best regards,

Manfred

by
Hi, Manfred:

    The problem has been solved. The problem was caused by a deprecated requirement of double finger slide. After the design related to this requirement is moved, It's all right now.

 

 

Best regards.

Stephen

Embedded Wizard Website | Privacy Policy | Imprint

...