stechy1 Posted January 21, 2018 Report Posted January 21, 2018 Hello, I have working basic project with FreeRTOS and uGFX library. Display is finaly showing what I want, but there is a problem. For now, I have one button with a label. When I press the button, then the label should change it's text, but nothing happening. I have done little bit of debugging and find out, that: - my touch driver can recognize, that there is some touch event - also my driver sucessfully read x and y coordinations - after that it continue in input processing in file: ginput_mouse.c On line 300 in that file there is code, that notifies listeners that are interested about touch event. I have registred listener, but nothing happening. At the bottom there is a link to full project, that should be compilable out of box. Im using System Workbench for STM32. Can anyone help me, what I'm doing wrong? Link to project: http://leteckaposta.cz/768971070
Joel Bodenmann Posted January 21, 2018 Report Posted January 21, 2018 Hi, Before we start to dive into this - were you able to successfully run the /demos/modules/gwin/button and/or /demos/modules/gwin/sliders demo?
stechy1 Posted January 21, 2018 Author Report Posted January 21, 2018 Hello, I have same problem. Everything is sucessfuly visible, but nothing happen when I push the button.
Joel Bodenmann Posted January 21, 2018 Report Posted January 21, 2018 How about \demos\tools\touch_driver_test ?
stechy1 Posted January 21, 2018 Author Report Posted January 21, 2018 Program get stuck at line 179: pem = (GEventMouse *)geventEventWait(&gl, TIME_INFINITE); When I touch on display, nothing happens.
cpu20 Posted January 21, 2018 Report Posted January 21, 2018 6 hours ago, stechy1 said: Program get stuck at line 179: pem = (GEventMouse *)geventEventWait(&gl, TIME_INFINITE); That is normal behaviour as you ask to wait indefinitly for an event that never comes. Biggest chance is that the failure is somwhere in the STMPE811 driver. I will look at your code tomorrow to see if I can catch something.
stechy1 Posted January 22, 2018 Author Report Posted January 22, 2018 Alright, I think, that I found the problem. I have button on coordinates {x:10; y:30} with size {width:100; height:30} When I touch the display where is the button, the driver will reads values {x:173; y:283} and this is a problem. But I have tested, that driver reads true values. When I subtract x value from width and y value from height, I get right values. So the question is, where I should subtract these values? The screen orientation is default btw.
inmarket Posted January 22, 2018 Report Posted January 22, 2018 You need to turn in touch calibration rather than trying to work with driver based auto-calibration. In this case your touch panel is not oriented correctly relative to your display for that to work.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now