Mario Kleiner
mario.kleiner.de@... [PSYCHTOOLBOX]
<
PSYCHTOOLBOX@yahoogroups.com> wrote:
>
Hmm. I read the docs that come with the eGalax custom driver your
colleague has installed, and i think you should leave it in place, as
your specific model of touchscreen is not covered by the Linux default
driver -- again some outdated touchscreen design. It would probably
only show up as mouse.
Also, are you using our touch demos unmodified? Because it doesn't
make sense to display on screen 0, given that that is not the
touchscreen. You need to change the PsychImaging('OpenWindow', 0, ...)
to PsychImaging('OpenWindow', 1, ...) to display on the touch screen
and also for PTB to understand that that is the monitor for which the
coordinate mappings should be done. The hard-coded screen 0 is just
because that was the only way i could test with that one touchscreen
laptop i had for testing.
Wrt. touches also affecting the other (e.g., non-touch) monitors UI:
Normally touches get transferred to all monitors, something that we'd
want to suppress for such a touch application. I added some code to do
that -- grab the touch input device for exclusive use by PTB.
Modify the call to the TouchQueueCreate() function in the demo to
provide the optional 'flags' parameter as 8, instead of leaving it
out.
Then you need a new PsychHID.mexa64 from here:
https://github.com/kleinerm/Psychtoolbox-3/raw/master/Psychtoolbox/PsychBasic/PsychHID.mexa64
This should make sure that touch input only goes to PTB for
processing, once the demo is running ie. TouchQueueStart() is called,
until TouchQueueStop gets called.
-mario
>
>
>
>>
>> [Attachment(s) from zhivagoa@... [PSYCHTOOLBOX] included below]
>>
>> Hey Mario,
>>
>> Thank you very much for the fix.
>>
>> xinput map-to-output 'eGalax Inc. eGalaxTouch EXC3160-5332-07.00.00' HDMI-3
>>
>> I'm supposed to substitute HDMI-3 with the touch monitor name as obtained from xrandr or ResolutionTest(), correct? I'm not seeing the touch monitor name with xrandr and 'eDP1' is what I get from ResolutionTest(). If I use eDP1, I get an error as shown below:
>>
>> visionlab@visionlab:~$ xinput map-to-output 'eGalax Inc. eGalaxTouch EXC3160-5332-07.00.00' eDP1
>> Unable to find output 'eDP1'. Output may not be connected..
>>
> Try this to access outputs on X-Screens other than 0, e.g., X-Screen 1:
>
> DISPLAY=:0.1 xinput map-to-output 'eGalax Inc. eGalaxTouch EXC3160-5332-07.00.00' eDP1
>
> However, with only 1 touch monitor on X-Screen 1, i don't think you need that command. Are you sure you really use the new TouchEventGet.m function ("which TouchEventGet")?
>
> I wonder if having that custom driver from eGalax installed makes things worse or creates some confusion? Your colleague said the touchscreen also worked without that custom driver, so maybe less is more here.
>
>> Tried running my test program with the latest TouchEventGet(), but I still erroneous mapping and
>
>
> If you look at the .normX and .normY fields, their coordinates should vary in a 0.0 - 1.0 interval for touches across the screen, and those get mapped into window local coordinates in the .mappedX .mappedY fields.
>
> Bedtime here,
> -mario
>
>
>
>>
>> also see X resetting in between.
>>