Question about New Notepad Demo for ChibiOS/GFX

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Wed May 29, 2013 3:31 am

First of all, to all of you that have make this possible, thank you! You guys are Rock Stars!!! :D

I managed to get the demo compiled but it isn't quite working for me.

It appears from the video that it is supposed to run in landscape mode but mine runs in portrait which causes the layout to be different.

The touch screen seems to be responding to the buttons but it is not actually drawing anything on the screen.

The calibration routine runs successfully, although this also seems to always run in portrait orientation, can that be changed?

I am using the STM32F4Discovery board and the Waveshare Open407V-D motherboard with their HY32C display.

I am using the SSD1289 driver, gdisp_lld_board_example_fsmc.h, and ADS7843 touchscreen driver.

Any suggestions on getting this working properly would be greatly appreciated.

Thanks.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Wed May 29, 2013 5:26 am

Hello and welcome to our forum!

The current implementation of the calibration routine is only working in the native orientation of your display module. The reasons for this are compatibility issues which might occurre with some hardware setups. I am currently thinking of removing the "Calibration" text so nobody notices it anymore.

The demo is not supposed to run in landscape nor portrait mode. It's supposed to run in the native mode of your display module which might be the portrait mode in your case. In order to change the orientation of the notepad demo, you may add a gdispSetOrientation() call somewhere at line 90 of the main.c file. The documentation about this call can be found here.

About your not working drawing: Does your system crash? Do you get any unhandled exception? Does the system keep running smoothly and just nothing happens? The demo is using some dirty hack/implementation of an interpolation algorithm. Try to draw slower. If it works then, you have to adjust the GINPUT_MOUSE_POLL_PERIOD in the *_config.h of the ADS7843. Try to set it to something like 2 or 3 instead of 25.


~ Tectu

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Abhishek » Wed May 29, 2013 2:59 pm

Hello xlh1460,

The demo is defined to work in such a way that it requires a screen which is more than 240 pixels wide. This means that if you are using a 240x320 display like the SSD1289, you will have to rotate the screen 90 degrees, to make all the UI elements draw all right.

Regarding your issue of being unable to draw in the area, more information is required as Tectu mentioned above.

Let us know your progress.

Regards
Abhishek

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Thu May 30, 2013 6:08 pm

Tectu wrote:
The current implementation of the calibration routine is only working in the native orientation of your display module.



I had no idea that they had a native mode, but I am very new at working with these type of displays.

Is the native mode determined by the chip?

Tectu wrote:
The demo is not supposed to run in landscape nor portrait mode. It's supposed to run in the native mode of your display module which might be the portrait mode in your case. In order to change the orientation of the notepad demo, you may add a gdispSetOrientation() call somewhere at line 90 of the main.c file. The documentation about this call can be found here.



I figured out how to set the orientation within the code in the notepadApp.c source and that worked well.

I obviously need to take a closer look at the documentation, though.

Tectu wrote:
About your not working drawing: Does your system crash? Do you get any unhandled exception? Does the system keep running smoothly and just nothing happens? The demo is using some dirty hack/implementation of an interpolation algorithm. Try to draw slower. If it works then, you have to adjust the GINPUT_MOUSE_POLL_PERIOD in the *_config.h of the ADS7843. Try to set it to something like 2 or 3 instead of 25.



It seems to work fine but just doesn't draw anything on the screen, even when moving slow.

Abhishek wrote:Hello xlh1460,

The demo is defined to work in such a way that it requires a screen which is more than 240 pixels wide. This means that if you are using a 240x320 display like the SSD1289, you will have to rotate the screen 90 degrees, to make all the UI elements draw all right.

Regarding your issue of being unable to draw in the area, more information is required as Tectu mentioned above.

Let us know your progress.

Regards
Abhishek


I figured out how to rotate it after I had posted my intial questions and that seems to have worked very well.

I will dig a bit deeper to see why it isn't drawing for me.

Thanks again.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Fri May 31, 2013 7:03 am

Can you please try to run this demo in order to see if the hardware works correctly? It's supposed to simply draw green dots wherever you touch the screen.


~ Tectu

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Mon Jun 10, 2013 1:41 am

Tectu wrote:Can you please try to run this demo in order to see if the hardware works correctly? It's supposed to simply draw green dots wherever you touch the screen.


~ Tectu


I downloaded the latest version of GFX from github and now I seem to be having issues building demos that I had working previously.

I want to start with a fresh environment.

What version of ChibiOS/RT and ChibiOS/GFX do you recommend that I download?

Thanks.

p.s. I previously had the touch_driver_test demo built and working correctly so I am confident my hardware is fine.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Mon Jun 10, 2013 5:53 am

We always try to keep the master state of the repository as stable as possible. However, this does not always work out. Could you please tell us exactly what errors you get and what you're trying to compile?
What exactly do you want to do? Are you after some playing with your touchscreen in your spare time or do you have to develop a real world application? If it's the former, try to stay at the master since there are a lot of new feaures coming every week. If it's the latter, you should get the latest release of ChibiOS/GFX.
ChibiOS/RT has officially been released in version 2.6.0 yesterday.


~ Tectu

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Wed Jun 12, 2013 7:02 pm

Tectu wrote:We always try to keep the master state of the repository as stable as possible. However, this does not always work out. Could you please tell us exactly what errors you get and what you're trying to compile?


My errors were related to problems with my environment. I set it all up again and have no problems building.

Tectu wrote:What exactly do you want to do? Are you after some playing with your touchscreen in your spare time or do you have to develop a real world application? If it's the former, try to stay at the master since there are a lot of new feaures coming every week. If it's the latter, you should get the latest release of ChibiOS/GFX.
ChibiOS/RT has officially been released in version 2.6.0 yesterday.


At this point I am mostly playing around with the boards and screens that I have accumulated.

I have been successfull with GFX versions 1.5, 1.6 and the master on both Chibios 2.4.3 and 2.6.0.

So far I have compiled and run the gdisp_basics and the touch_driver_test demos without issue.

I didn't think that the touch screen demo that you pointed me to was working.

I just turned out that little bitty green dots are hard to see on the blue calibration background. :D

I added a line to clear the display and that demo is working fine as well, although I am getting a series of dots rather than a line unless I move really, really slow.

Thanks.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Wed Jun 12, 2013 8:23 pm

Hehe, the green pixels are indeed hard to see on a blue background. I fixed the demo by adding a clear line after the calibration has been called.

You are supposed not to get a smooth line. Inside the *_conf.h file of your ginput driver you fill find a polling delay macro. This defines the frequency with wich your touchscreen is polled. Otherwise the touchscreen polling would eat all your CPU.
You may decrease this value to 2 or 3 if you want smoother lines.


~ Tectu

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Wed Jun 12, 2013 8:36 pm

Tectu wrote:Hehe, the green pixels are indeed hard to see on a blue background. I fixed the demo by adding a clear line after the calibration has been called.

You are supposed not to get a smooth line. Inside the *_conf.h file of your ginput driver you fill find a polling delay macro. This defines the frequency with wich your touchscreen is polled. Otherwise the touchscreen polling would eat all your CPU.
You may decrease this value to 2 or 3 if you want smoother lines.


~ Tectu


Thanks. I just tried that and it worked fine.

I am still not getting anything with the notepad app though. I set breakpoints in the draw_point and draw_line functions and they are not getting called at all.

I think there is something else wrong there.


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 7 guests