Functions | |
INT16 | eyelink_abort (void) |
INT16 | eyelink_start_setup (void) |
void | eyelink_set_tracker_setup_default (INT16 mode) |
INT16 | eyelink_in_setup (void) |
INT16 | eyelink_target_check (INT16 FARTYPE *x, INT16 FARTYPE *y) |
INT16 | eyelink_target_checkf (float FARTYPE *x, float FARTYPE *y) |
INT16 | eyelink_accept_trigger (void) |
INT16 | eyelink_driftcorr_start (INT16 x, INT16 y) |
INT16 | eyelink_driftcorr_startf (float x, float y) |
INT16 | eyelink_cal_result (void) |
INT16 | eyelink_apply_driftcorr (void) |
INT16 | eyelink_cal_message (char FARTYPE *msg) |
void | exit_calibration (void) |
INT16 | do_tracker_setup (void) |
INT16 | do_drift_correct (INT16 x, INT16 y, INT16 draw, INT16 allow_setup) |
INT16 | do_drift_correctf (float x, float y, INT16 draw, INT16 allow_setup) |
These methods are used to setup the EyeLink tracker such as Camera Setup, Calibration, Drift Correction, Validation, etc.
INT16 do_drift_correct | ( | INT16 | x, |
INT16 | y, | ||
INT16 | draw, | ||
INT16 | allow_setup | ||
) |
Performs a drift correction before a trial.
<allow_setup>
determines the result. If 1
, the EyeLink Setup menu is accessed. This will always clear the display, so redrawing of hidden stimuli may be required. Otherwise, the drift correction is aborted. Calling exit_calibration()
from an event handler will cause any call to do_drift_correct()
in progress to return immediately. In all cases, the return code will be 27
(ESC_KEY
). x | X Position of drift correction target. |
y | Y Position of drift correction target. |
draw | If 1 , the drift correction will clear the screen to the target background color, draw the target, and clear the screen again when the drift correction is done. If 0 , the fixation target must be drawn by the user. |
allow_setup | If 1 , accesses Setup menu before returning, else aborts drift correction. |
0
if successful, 27
if 'ESC' key was pressed to enter Setup menu or abort.Example:
do_tracker_setup()
and set_dcorr_sounds()
INT16 do_drift_correctf | ( | float | x, |
float | y, | ||
INT16 | draw, | ||
INT16 | allow_setup | ||
) |
Performs a drift correction before a trial. Same as do_drift_correct() except, this takes the x,y values as float.
<allow_setup>
determines the result. If 1
, the EyeLink Setup menu is accessed. This will always clear the display, so redrawing of hidden stimuli may be required. Otherwise, the drift correction is aborted. Calling exit_calibration()
from an event handler will cause any call to do_drift_correct()
in progress to return immediately. In all cases, the return code will be 27
(ESC_KEY
). x | X Position of drift correction target. |
y | Y Position of drift correction target. |
draw | If 1 , the drift correction will clear the screen to the target background color, draw the target, and clear the screen again when the drift correction is done. If 0 , the fixation target must be drawn by the user. |
allow_setup | If 1 , accesses Setup menu before returning, else aborts drift correction. |
0
if successful, 27
if 'ESC' key was pressed to enter Setup menu or abort.Example:
do_tracker_setup()
and set_dcorr_sounds()
INT16 do_tracker_setup | ( | void | ) |
Switches the EyeLink tracker to the Setup menu, from which camera setup, calibration, validation, drift correction, and configuration may be performed. Pressing the 'ESC' key on the tracker keyboard will exit the Setup menu and return from this function. Calling exit_calibration()
from an event handler will cause any call to do_tracker_setup()
in progress to return immediately.
0
.Example:
void exit_calibration | ( | void | ) |
This function should be called from an message or event handler if an ongoing call to do_drift_correct()
or do_tracker_setup()
should return immediately.
Example:
do_tracker_setup()
, do_drift_correct()
and eyelink_current_mode()
INT16 eyelink_abort | ( | void | ) |
Places EyeLink tracker in off-line (idle) mode.
eyelink_wait_for_mode_ready()
afterwards to ensure tracker has finished the mode transition. This function pair is implemented by the eyelink_exptkit library function set_offline_mode()
. 0
if mode switch begun, else link error.Example:
eyelink_wait_for_mode_ready()
and set_offline_mode()
INT16 eyelink_accept_trigger | ( | void | ) |
Triggers the EyeLink tracker to accept a fixation on a target, similar to the 'Enter' key or spacebar on the tracker.
NO_REPLY
if drift correction not completed yet.OK_RESULT (0)
if success.ABORT_REPLY (27)
if 'ESC' key aborted operation.-1
if operation failed.1
if poor calibration or excessive validation error.Example: See eyelink_driftcorr_start()
INT16 eyelink_apply_driftcorr | ( | void | ) |
Applies the results of the last drift correction. This is not done automatically after a drift correction, allowing the message returned by eyelink_cal_message()
to be examined first.
0
if command sent OK, else link error.Example: See eyelink_driftcorr_start()
INT16 eyelink_cal_message | ( | char FARTYPE * | msg | ) |
Returns text associated with result of last calibration, validation, or drift correction. This usually specifies errors or other statistics.
msg | Buffer to return back the message. |
0
if no message since last command sent, else length of string.Example:
Output:
INT16 eyelink_cal_result | ( | void | ) |
Checks for a numeric result code returned by calibration, validation, or drift correction.
NO_REPLY
if drift correction not completed yet.OK_RESULT (0)
if success.ABORT_REPLY (27)
if 'ESC' key aborted operation.-1
if operation failed.1
if poor calibration or excessive validation error.eyelink_driftcorr_start()
INT16 eyelink_driftcorr_start | ( | INT16 | x, |
INT16 | y | ||
) |
Sets the position of the drift correction target, and switches the tracker to drift-correction mode. Should be followed by a call to eyelink_wait_for_mode_ready()
.
x | X position of the target. |
y | Y position of the target. |
0
if command sent OK, else link error.Example:
eyelink_accept_trigger()
and eyelink_send_keybutton()
INT16 eyelink_driftcorr_startf | ( | float | x, |
float | y | ||
) |
Sets the position of the drift correction target, and switches the tracker to drift-correction mode. Should be followed by a call to eyelink_wait_for_mode_ready()
. Same as eyelink_driftcorr_start() except the x,y parameters take floating point values.
x | X position of the target. |
y | Y position of the target. |
0
if command sent OK, else link error.Example:
eyelink_accept_trigger()
and eyelink_send_keybutton()
INT16 eyelink_in_setup | ( | void | ) |
Checks if tracker is still in a Setup menu activity (includes camera image view, calibration, and validation). Used to terminate the subject setup loop.
0
if no longer in setup mode.Example:
Output:
eyelink_current_mode()
void eyelink_set_tracker_setup_default | ( | INT16 | mode | ) |
sets the default mode to enter when eyelink_start_setup is called.
mode | 1 -> start in image mode. 0 -> start in menu mode |
INT16 eyelink_start_setup | ( | void | ) |
Enters setup mode
INT16 eyelink_target_check | ( | INT16 FARTYPE * | x, |
INT16 FARTYPE * | y | ||
) |
Returns the current target position and state.
x | Pointer to variable to hold target X position. |
y | Pointer to variable to hold target Y position. |
1
if target is visible, 0 if not.Example:
INT16 eyelink_target_checkf | ( | float FARTYPE * | x, |
float FARTYPE * | y | ||
) |
Returns the current target position and state. Same as eyelink_target_check() except this function returns data in floating point values.
x | Pointer to variable to hold target X position. |
y | Pointer to variable to hold target Y position. |
1
if target is visible, 0 if not.