emWIn, Problems with LISTWHEEL-SetSnapPosition command

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
JoLo_284096
Level 4
Level 4
First like received

Dear All:

   

I am trying to create a LISTWHEEL windows on a TFT display.

   

My hardware is a CY8CKIT-050 development kit  and for the display I am using PSOC TFT Expansion Board from Mikroelectronika and, also I am using the emWin library.

   

I want to create two ListWheels to setup the hour and minute of my system. The problem comes because the command LISTWHEEL_SetSnapPosition does not work properly when the two List Wheels (one for the hour and the other for minutes) are created, I mean, it works when only one ListWheel is created, but as soon as I create the second the command does not work for any of the two ListWheel, so it is difficult for the user to setup the hour and minute required.

   

The source code is in .../Sources Files/Cross Platforms/entry.c. I leave a bundle of the project and you can see the source is very simple.

   

Using the simulator of the emWin, it works properly but when I pass the same to the PSOC it does not work. I have been trying several things but I dont find which can be the problem. If you need any further information do not hesitate to ask for it.

   

Please, any kind of help would be welcomed.

   

Thanks in advance,

   

Joaquin.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I tried to create something similar.
I used the example Count.h and your entry.c file to create the entry.h
I used the entry.h file in my project SSD1289x16_emwin.zip
You need to add this file to the project and change  in main.c:
14 #include "entry.h"
it's here:
http://www.cypress.com/forum/psoc-creator-software/only-8-colors-emwin#comment-404191

 

   

View solution in original post

0 Likes
5 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Your archive is not complete:
EmWinGraphics_v1_0 - reduced when archiving..
not found:    display.h    screen.c   ../Pictures/cerro2.c   Fonts/......    sensors_psoc.h      sd.h   sd.c 

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I tried to create something similar.
I used the example Count.h and your entry.c file to create the entry.h
I used the entry.h file in my project SSD1289x16_emwin.zip
You need to add this file to the project and change  in main.c:
14 #include "entry.h"
it's here:
http://www.cypress.com/forum/psoc-creator-software/only-8-colors-emwin#comment-404191

 

   

0 Likes
JoLo_284096
Level 4
Level 4
First like received

Dear pavloven,

   

Thank you very much for your support.

   

What I have done is to take your entry.h and copy all your code in a new entry.c file in my project. In the Segger simulator it works perfect but when I program the PSOC device, the SetSnapPosition command does not work, I can leave the position of  the LISTWHEEL in any position, so the same problem I have in the original project.

   

As said before, when only one LISTWHEELL is leave in the code, it works, but when I create two it does not work.

   

Any idea of what can be?

   

Thanks again.

   

Joaquin.

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

It seems I do not understand what does not work.
I added   LISTWHEEL_SetSel(..)

   

0 Likes
JoLo_284096
Level 4
Level 4
First like received

Dear Pavloven,

   

Thank you very much for your efforts.

   

Regarding the problem, the position where you leave the ListWheel is discrete, that is, if you leave the wheel  between two values, it moves to the next position automaticall . My problem is that I can leave the wheel in any position, that is, in a value to choose that value or between two values so it is not possible to know which is the selected value, that is my ListWheels are analog.

   

I have taken you project and change everything to fit my project, the GLCD, the PSOC and so on....but the problem still is there. As we did not success and have no so much time we have implemented the function with other widget and leave this problem for now.

   

Sorry I can not give you more details and overall the solution.

   

Anyway thank you very much for your help.

   

Regards,

   

Joaquin.

0 Likes