[−][src]Function libeyelink_sys::eyelink_driftcorr_startf
pub unsafe extern "C" fn eyelink_driftcorr_startf(x: f32, y: f32) -> INT16
@ingroup setup_eyelink Sets the position of the drift correction target, and switches the tracker to drift-correction mode. Should be followed by a call to \c eyelink_wait_for_mode_ready(). Same as eyelink_driftcorr_start() except the x,y parameters take floating point values.
@param x X position of the target. @param y Y position of the target. @return \c 0 if command sent OK, else link error.
\b Example:
\code #includeunsigned key; int result = 0; int x, y; // position of the drift correction target if(eyelink_is_connected()) { eyecmd_printf("heuristic_filter = ON"); ... while(getkey()) {}; // dump the keys eyelink_driftcorr_start(x, y); // start the drift correction do { result = eyelink_cal_result(); key = getkey(); switch(key) { case TERMINATE_KEY: // breakout code return TERMINATE_KEY; case 0: // no key case JUNK_KEY: // no key break; case ESC_KEY: // ESC key: we flag abort from our end result = 27; break; case 32: // Spacebar: we trigger ourselves eyelink_accept_trigger(); break; default: eyelink_send_keybutton(key,0,KB_PRESS); break; } } while(result == NO_REPLY); if (result != 27 && result != -1) eyelink_apply_driftcorr(); else ; // Other code for handling return result; } \endcode
\sa \c eyelink_accept_trigger() and \c eyelink_send_keybutton()