FORPWait - aleslab/Psychtoolbox-3-aleslab-fork GitHub Wiki

FORPWait Checks for the specified amount of time, if a button of a FORP device
(tested for HH-5-CYL) is pressed , returns if a button has been
pressed or specified amount of time has passed.

Usage:

[KeyPressed,EventTime] = FORPWait([Seconds])

Arguments:

Seconds Maximum time to check for buttonpresses in seconds.
Default's to 'wait forever' if not provided.

Returns the keycode (KeyPressed) of the pressed button and the
time (EventTime) of the status check.

KeyPressed KeyCode of the Pressed Button or empty value if
waiting timed out without any key press.

EventTime Time of keypress as returned by GetSecs.

IMPORTANT NOTE:

Current-Designs FORP Device (HH-5-CYL) does not return any values for
manufacturer or product, so i used the VendorID returned by
PsychHID('Devices') for the HH-5-CYL.(ATM i do no really know if the
VendorID has unique values).
Another issue i had to solve was a ?bug? using 'GetReport'. I had to
close the Callbackhandlers to the current device by calling
'ReceiveReportsStop' before calling 'GetReport' on another device.
If you have got any advice for a better way solve those problems, feel
free to let me know:

      Florian Stendel   
      Visual Processing Lab  
      Universitaets - Augenklinik Magdeburg  
      Leipziger Strasse 44  
      39120 Magdeburg  
      Tel:    0049 (0)391 67 21723  
      Email:  [email protected]  

09/10/06 fs Wrote it.
19/10/06 fs Added some further improvements suggested by Mario
Kleiner.

Path   Retrieve current version from GitHub | View changelog
Psychtoolbox/PsychHardware/FORP/FORPWait.m
⚠️ **GitHub.com Fallback** ⚠️