Multiple input screens

Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Multiple input screens

Postby Graeme » Fri Mar 01, 2013 10:41 am

Hi.

First of all, great project.

I have two problems.

1. When using the button example on the website, I can see that the button on the screen changes when I push it. Sometimes however the LED does not change. Almost as if the button press was missed but as mentioned I do see the color of the button change whenever I press it. Have played with some of the timings (Jitter etc) , but no luck.

2. I know how to create buttons for a screen, but if I want to display a new screen with new buttons, how do I delete the button on the old screeen so that it does not trigger when I get inputs from a second menu screen? Was looking for some kind of button_delete(xx) function before drawing the new screen, but couldn't see anything like that.

Thanks

Graeme

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Multiple input screens

Postby Tectu » Fri Mar 01, 2013 11:31 am

Thank you very much for your positive feedback.

1. I do have this issue as well, but only on one out of four touchscreens. I did try to track down the issue but I never found a solution to solve it. The event itself is triggered (you can see that because the button actually changes to pressed down). However, the problem is the release thing. When you have a lot of noise on your touchscreen (for example, when you don't have a dedicated controller and do it bare metal with your ADC), it can happen that the software thinks that you released the button outside of it's area.
The feature that you can cancel a button press by releasing outside of it is actually wanted that way, sadly it's a bit a of a problem with the case described above.
Maybe we should add a macro which allows it to turn the feature off in the gfxconf.h configuration file.

2. You are right, there isn't any function to disable/destroy a button. I've never thought of that, this should really be added. Sorry!


~ Tectu

Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Re: Multiple input screens

Postby Graeme » Fri Mar 01, 2013 12:58 pm

Hi Tectu,

Thanks for the quick reply.

Also had the idea that it might be a noise problem. Have noticed some noise on the Notepad application when sometimes drawing a line can result is a random pixel being displayed away from the pen position. Maybe the same issue. Will try and see if I can work around the problem. The display I am using is the ITeadStudio 3.2"TFT shield designed for arduino. I am usng it on STM32F4 Discovery. It has a on board touch screen controller (supported by ChibiOS/GFX). I have two of these. Will try the other one as well ans see if it does the same.

Will see if I can implement some kind of button destroy functionality as well.

Regards
Graeme

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Multiple input screens

Postby Tectu » Fri Mar 01, 2013 1:58 pm

Hey there,

Please make sure you set the SPI frequency as low as possible (highest prescaler). I know that a lower SPI frequency results in WAY better results.
However, it's exactly that one pixel being outside of the button which makes the cancel action. You could simply try a bigger button (just for confirmation).

When you found some time to implement the destroy function, that would be lovely because I'm currently really short on time.



~ Tectu

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Multiple input screens

Postby Tectu » Sat Mar 02, 2013 1:07 pm

Our biggest contributor, inmarket, just added the function to destroy buttons. It's now available in the master repo.
Thank you very much, inmarket!


~ Tectu

inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm
Location: Brisbane, Australia

Re: Multiple input screens

Postby inmarket » Sat Mar 02, 2013 1:28 pm

To get around the button release issue I have added a patch for a gfxconf.h variable GWIN_BUTTON_LAZY_RELEASE (set it to TRUE).

The reality is that if your touch screen is too inaccurate to handle the release correctly then you probably need to adjust the touch controller parameters. There is a test program under demos/modules/ginput_touch_driver_test which helps to fine tune the touch parameters for your controller. Even using the same controller - due to differences in the touch plate resistance or capacitance or the wires attaching it, SPI speed (as Tectu pointed out) or numerous other factors, you may need to tune them.

With regard to button deletion - there is no need for a specific delete routine. Just call the generic gwinDestroyWindow(). Oops - just noticed a bug, it doesn't clean up the buttons internal listener. I've just raised a patch for that too.

I haven't tested the patches but they are so simple they should do the job.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Multiple input screens

Postby Tectu » Sat Mar 02, 2013 7:41 pm

I've updated the docs to show people the new macro to disable the cancel feature. I also wrote a small blogpost.


~ Tectu

Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Re: Multiple input screens

Postby Graeme » Sun Mar 03, 2013 5:53 am

Thanks everyone for the responses and the help. Will give the patches a try later today
Thanks again
Graeme


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 15 guests