SR Research Support Site
Macros | Functions
Calibration Target Presentation Example

Macros

#define TARGET_SIZE   20
 
#define CAL_TARG_BEEP   1
 
#define CAL_GOOD_BEEP   0
 
#define CAL_ERR_BEEP   -1
 
#define DC_TARG_BEEP   3
 
#define DC_GOOD_BEEP   2
 
#define DC_ERR_BEEP   -2
 

Functions

INT16 setup_cal_display (void)
 
void exit_cal_display (void)
 
void draw_cal_target (INT16 x, INT16 y)
 
void erase_cal_target (void)
 
void clear_cal_display (void)
 
void cal_sound (INT16 sound)
 
void cal_target_beep (void)
 
void cal_done_beep (INT16 error)
 
void dc_target_beep (void)
 
void dc_done_beep (INT16 error)
 

Detailed Description

Macro Definition Documentation

#define CAL_ERR_BEEP   -1
#define CAL_GOOD_BEEP   0
#define CAL_TARG_BEEP   1
#define DC_ERR_BEEP   -2
#define DC_GOOD_BEEP   2
#define DC_TARG_BEEP   3
#define TARGET_SIZE   20

Function Documentation

void cal_done_beep ( INT16  error)

This function is called to signal end of calibration.

Parameters
errorif non zero, then the calibration has error.
void cal_sound ( INT16  sound)

In most cases on can implement all four (cal_target_beep, cal_done_beep,dc_target_beep,dc_done_beep) beep callbacks using just one function.

This function is responsible for selecting and playing the audio clip.

Parameters
soundsound id to play.
void cal_target_beep ( void  )

This function is called to signal new target.

void clear_cal_display ( void  )

Called to clear the calibration display.

void dc_done_beep ( INT16  error)

This function is called to signal the end of drift correct.

Parameters
errorif non zero, then the drift correction failed.
void dc_target_beep ( void  )

This function is called to signal a new drift correct target.

void draw_cal_target ( INT16  x,
INT16  y 
)

This function is responsible for the drawing of the target for calibration,validation and drift correct at the given coordinate.

Parameters
xx coordinate of the target.
yy coordinate of the target.
Remarks
The x and y are relative to what is sent to the tracker for the command screen_pixel_coords.
void erase_cal_target ( void  )

This function is responsible for erasing the target that was drawn by the last call to draw_cal_target.

void exit_cal_display ( void  )

This is called to release any resources that are not required beyond calibration. Beyond this call, no calibration functions will be called.

INT16 setup_cal_display ( void  )

Setup the calibration display. This function called before any calibration routines are called.


Copyright ©2002-2021, SR Research Ltd.