|
81 | 81 | return |
82 | 82 | end |
83 | 83 |
|
84 | | - % |
| 84 | + % Last check that the EL is up to work |
85 | 85 | if ~EyelinkInit(0, 1) |
86 | 86 | fprintf('Eyelink Init aborted.\n'); |
87 | 87 | return |
|
97 | 97 | % make sure that we get gaze data from the Eyelink |
98 | 98 | Eyelink('Command', 'link_sample_data = LEFT,RIGHT,GAZE,AREA'); |
99 | 99 |
|
100 | | - % STEP 4 |
| 100 | + %% STEP 4 |
101 | 101 | % SET UP TRACKER CONFIGURATION |
| 102 | + |
102 | 103 | % Setting the proper recording resolution, proper calibration type, |
103 | 104 | % as well as the data file content; |
104 | | - % Eyelink('command', 'add_file_preamble_text ''Recorded by |
105 | | - % EyelinkToolbox demo-experiment'''); |
| 105 | + |
| 106 | + Eyelink('command', 'add_file_preamble_text', 'Recorded by EyelinkToolbox demo-experiment'); |
106 | 107 |
|
107 | 108 | % This command is crucial to map the gaze positions from the tracker to |
108 | 109 | % screen pixel positions to determine fixation |
109 | 110 | Eyelink('command', 'screen_pixel_coords = %ld %ld %ld %ld', 0, 0, 0, 0); |
110 | 111 | Eyelink('message', 'DISPLAY_COORDS %ld %ld %ld %ld', 0, 0, 0, 0); |
111 | 112 |
|
112 | | - % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % |
113 | | - % DEFAULT CALIBRATION |
| 113 | + if cfg.eyeTracker.defaultCalibration |
| 114 | + |
| 115 | + end |
| 116 | + |
| 117 | + % Set default calibration parameters |
114 | 118 | % set calibration type. |
115 | 119 | Eyelink('command', 'calibration_type = HV5'); |
116 | 120 |
|
|
119 | 123 | Eyelink('command', 'generate_default_targets = YES'); |
120 | 124 |
|
121 | 125 | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % |
122 | | -% |
| 126 | +% |
123 | 127 | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % |
124 | 128 | % % CUSTOM CALIBRATION |
125 | 129 | % % (SET MANUALLY THE DOTS COORDINATES, HERE FOR 6 DOTS) |
126 | 130 | % Eyelink('command', 'calibration_type = HV5'); |
127 | 131 | % % you must send this command with value NO for custom calibration |
128 | 132 | % % you must also reset it to YES for subsequent experiments |
129 | 133 | % Eyelink('command', 'generate_default_targets = NO'); |
130 | | -% |
| 134 | +% |
131 | 135 | % % calibration and validation target locations |
132 | 136 | % [width, height]=Screen('WindowSize', screenNumber); |
133 | 137 | % Eyelink('command','calibration_samples = 6'); |
|
138 | 142 | % 640,614, ... %width/2,height*0.6 |
139 | 143 | % 128,341, ... %width*0.1,height*1/3 |
140 | 144 | % 1152,341 ); %width-width*0.1,height*1/3 |
141 | | -% |
| 145 | +% |
142 | 146 | % Eyelink('command','validation_samples = 5'); |
143 | 147 | % Eyelink('command','validation_sequence = 0,1,2,3,4,5'); |
144 | 148 | % Eyelink('command','validation_targets = %d,%d %d,%d %d,%d %d,%d %d,%d',... |
|
0 commit comments