Skip navigation.
Home
The QNX Community Portal

View topic - devi-elo input driver

devi-elo input driver

Discussions, suggestions, requests about this website.

RE: Re: RE: Re: RE: devi-elo input driver

Postby sheran.vaz » Thu May 14, 2009 4:08 am

It should be in the same way as a touch event
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

RE: Re: RE: Re: RE: devi-elo input driver

Postby sheran.vaz » Thu May 21, 2009 11:59 am

I created a region using PhRegionOpen() and then used the PhEmit() API to simulate the touch event for which i gave the captured co-ordinates which intersect with the Launch button. This time the Mouse pointer moved to on top of the Launch button but still the button wasn't activated.

PhRid_t PRid;
PhRegion_t PRegion;
PhRect_t PRect;
char *photon_group;

memset(&PRegion, 0, sizeof(PRegion));
memset(&PRect, 0x0, sizeof(PRect));

//Filling up of PhRegion_t structure.
PRegion.events_sense = Ph_EV_SYSTEM | Ph_EV_SERVICE;
PRegion.flags = Ph_FORCE_FRONT | Ph_PTR_REGION;
PRegion.input_group = 1;

//Filling up of PhRect_t structure.
PRect.ul.x = 0;
PRect.ul.y = 0;
PRect.lr.x = 1023;
PRect.lr.y = 767;

PRid = PhRegionOpen(Ph_REGION_EV_SENSE |
Ph_REGION_FLAGS |
Ph_REGION_RECT |
Ph_REGION_INPUT_GROUP,
&PRegion,&PRect,NULL);

and then this is how i emmitted the raw ptr event using the PhEmit()

//Captured data For PhEmit()
PhRawPtrEvent_t PhotonRawPtrEvent;
PhRawPtrCoord_t *ptrCoord;
PhotonRawPtrEvent.msec = 0;
PhotonRawPtrEvent.button_state = 0;
PhotonRawPtrEvent.flags = (char)0;
PhotonRawPtrEvent.raw_flags = (char)0;
PhotonRawPtrEvent.zero = 0;

//BOTTOM LEFT Co-ords
PhotonRawPtrEvent.num_coord = 1;
ptrCoord = PhotonRawPtrEvent.coord;
ptrCoord->x = 25;
ptrCoord->y = 755;
ptrCoord->z = 0;
ptrCoord->dmsec = 0;

//PhEmit() Part
event.type = Ph_EV_RAW;
event.subtype = Ph_EV_RAW_PTR;
event.num_rects = 1;
event.data_len = 20;
event.emitter.rid = PRid;
event.collector.rid = 0;
event.collector.rid = Ph_ROOT_RID;
rect.ul.x = rect.ul.y = 0;
rect.lr.x = rect.lr.y = 0;

PhEmit( &event, &rect, (void *) &PhotonRawPtrEvent);

can anyone help me find what i'm missing? How will the event emmitted in the region i've created can be sent to the region below?
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

Re: devi-elo input driver

Postby milanovic8791 » Thu Dec 22, 2011 9:55 am

Hi guys,

I know that this comes long after you had this conversation about ELO touchscreens, but I hope you are still active, and
could find some time to help me.

I am trying to establish basic touch screen function, where touching the screen would be equivalent to left-clicking
same point by mouse. Currently I am not concentrating on return codes, so I have not developed any application, I am
only typing commands in pterm.
I am working with 1024x768 resolution on ET1515L-8CEC-1-GY-G model with serial communication. Version of operating
system is 6.3.0 SP3, although I believe that nothing would change on 6.3.2.
I typed:
# calib
Then I left-clicked four times on target and finally on button where text "Press to complete Calibration" was displayed.

This operation created file /etc/system/trap/calib.Miki (Miki is hostname on my computer).
Then I typed:
# devi-elo smartset fd -d/dev/ser1
when following error was reported:
Error: found graphics region with no capabilities data
but apparently some touchscreen function was initiated.
Problem is that only small bottom part of the screen has touchscreen function, y-coordinate is upside down, and x-
coordinate has wrong scaling (value of x-coordinate of the cursor is larger than value of x-coordinate of the touch
point , multiplied by around four), and there is x-coordinate offset (when most left point on the screen is touched,
cursor is moved to right by more than 50 pixels).

Any thoughts?

Best regards,
Miki
milanovic8791
New Member
 
Posts: 2
Joined: Thu Dec 22, 2011 9:42 am

Re: devi-elo input driver

Postby milanovic8791 » Thu Dec 22, 2011 12:09 pm

Hi guys,

I know that this comes long after you had this conversation about ELO touchscreens, but I hope you are still active, and
could find some time to help me.

I am trying to establish basic touch screen function, where touching the screen would be equivalent to left-clicking
same point by mouse. Currently I am not concentrating on return codes, so I have not developed any application, I am
only typing commands in pterm.
I am working with 1024x768 resolution on ET1515L-8CEC-1-GY-G model with serial communication. Version of operating
system is 6.3.0 SP3, although I believe that nothing would change on 6.3.2.
I typed:
# calib
Then I left-clicked four times on target and finally on button where text "Press to complete Calibration" was displayed.

This operation created file /etc/system/trap/calib.Miki (Miki is hostname on my computer).
Then I typed:
# devi-elo smartset fd -d/dev/ser1
when following error was reported:
Error: found graphics region with no capabilities data
but apparently some touchscreen function was initiated.
Problem is that only small bottom part of the screen has touchscreen function, y-coordinate is upside down, and x-
coordinate has wrong scaling (value of x-coordinate of the cursor is larger than value of x-coordinate of the touch
point , multiplied by around four), and there is x-coordinate offset (when most left point on the screen is touched,
cursor is moved to right by more than 50 pixels).

Any thoughts?

Best regards,
Miki
milanovic8791
New Member
 
Posts: 2
Joined: Thu Dec 22, 2011 9:42 am

Re: devi-elo input driver

Postby maschoen » Tue Jan 03, 2012 11:21 pm

I'm a little confused on your calibration procedure. I would expect instead the following.

1) Start the driver
2) Run the calibration program

You used the term "click" when describing how you used the calibration program. That sounds like you are using the mouse. This would not work at all.

The whole point of the calibration process is to use the driver and hardware to read in data from where you press and find the coefficients to transform your presses to real places on the screen.

I hope this helps.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Previous

Return to OpenQNX Site

Who is online

Users browsing this forum: No registered users and 1 guest