|
43 | 43 | % targets |
44 | 44 | el.backgroundcolour = [cfg.eyeTracker.backgroundColor, (cfg.screen.win)]; |
45 | 45 | el.msgfontcolour = cfg.eyeTracker.fontColor; |
46 | | - el.calibrationtargetcolour = cfg.eyeTracker.calibrationTargetColor |
47 | | - el.calibrationtargetsize = cfg.eyeTracker.calibrationTargetSize |
48 | | - el.calibrationtargetwidth = cfg.eyeTracker.calibrationTargetWidth |
49 | | - el.displayCalResults = cfg.eyeTracker.displayCalResults |
| 46 | + el.calibrationtargetcolour = cfg.eyeTracker.calibrationTargetColor; |
| 47 | + el.calibrationtargetsize = cfg.eyeTracker.calibrationTargetSize; |
| 48 | + el.calibrationtargetwidth = cfg.eyeTracker.calibrationTargetWidth; |
| 49 | + el.displayCalResults = cfg.eyeTracker.displayCalResults; |
50 | 50 |
|
51 | 51 | % Call this function for changes to the calibration structure to take |
52 | 52 | % affect. |
|
55 | 55 | % Initialize EL and make sure it worked: returns 0 if OK, -1 if error. |
56 | 56 |
|
57 | 57 | % Check that EL is initialzed and connected, otherwise abort experiment |
58 | | - eyetrackerCheckConnection |
| 58 | + eyetrackerCheckConnection; |
59 | 59 |
|
60 | 60 | % Open the edf file to write the data. |
61 | 61 | edfFile = 'demo.edf'; |
|
71 | 71 |
|
72 | 72 | % Make sure that we get gaze data from the Eyelink. |
73 | 73 | Eyelink('Command', 'link_sample_data = LEFT,RIGHT,GAZE,AREA'); |
74 | | - Eyelink('Command', 'link_event_data = GAZE,GAZERES,HREF,AREA,VELOCITY'); |
75 | | - Eyelink('Command', 'link_event_filter = LEFT,RIGHT,FIXATION,BLINK,SACCADE,BUTTON'); |
| 74 | + Eyelink('command', 'link_event_data = GAZE,GAZERES,HREF,AREA,VELOCITY'); |
| 75 | + Eyelink('command', 'link_event_filter = LEFT,RIGHT,FIXATION,BLINK,SACCADE,BUTTON'); |
76 | 76 |
|
77 | 77 | %% Calibration |
78 | 78 |
|
|
223 | 223 |
|
224 | 224 | function eyetrackerCheckConnection |
225 | 225 |
|
226 | | - % Initialize EL and make sure it worked: returns 0 if OK, -1 if error. |
227 | | - % Exit program if this fails. |
228 | | - elInit = Eyelink('Initialize'); |
229 | | - if ELinit ~= 0 |
230 | | - error('Eyelink is not initialized, aborted.\n'); |
231 | | - end |
232 | | - |
233 | | - % Make sure EL is still connected: returns 1 if connected, -1 if dummy-connected, |
234 | | - % 2 if broadcast-connected and 0 if not connected. Exit program if this fails. |
235 | | - elConnection = Eyelink('IsConnected'); |
236 | | - if ELconnection ~= 1 |
237 | | - error('Eyelink is not connected, aborted.\n'); |
238 | | - end |
| 226 | + % Initialize EL and make sure it worked: returns 0 if OK, -1 if error. |
| 227 | + % Exit program if this fails. |
| 228 | + elInit = Eyelink('Initialize'); |
| 229 | + if ELinit ~= 0 |
| 230 | + error('Eyelink is not initialized, aborted.\n'); |
| 231 | + end |
| 232 | + |
| 233 | + % Make sure EL is still connected: returns 1 if connected, -1 if dummy-connected, |
| 234 | + % 2 if broadcast-connected and 0 if not connected. Exit program if this fails. |
| 235 | + elConnection = Eyelink('IsConnected'); |
| 236 | + if ELconnection ~= 1 |
| 237 | + error('Eyelink is not connected, aborted.\n'); |
| 238 | + end |
239 | 239 |
|
240 | 240 | end |
241 | 241 |
|
|
0 commit comments