File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,6 @@ function cleanUp()
16
16
% Screen Close All
17
17
sca ;
18
18
19
- % Shut down connection with Eyelink
20
- try
21
- Eyelink(' shutdown' );
22
- catch
23
- end
24
-
25
19
% Close Psychportaudio if open
26
20
if PsychPortAudio(' GetOpenDeviceCount' ) ~= 0
27
21
PsychPortAudio(' Close' );
Original file line number Diff line number Diff line change 228
228
% Exit program if this fails.
229
229
elInit = Eyelink(' Initialize' );
230
230
if elInit ~= 0
231
+ Eyelink(' shutdown' );
231
232
error([newline ' Eyelink is not initialized, aborted.' ]);
232
233
end
233
234
234
235
% Make sure EL is still connected: returns 1 if connected, -1 if dummy-connected,
235
236
% 2 if broadcast-connected and 0 if not connected. Exit program if this fails.
236
237
elConnection = Eyelink(' IsConnected' );
237
238
if elConnection ~= 1
239
+ Eyelink(' shutdown' );
238
240
error([newline ' Eyelink is not connected, aborted.' ]);
239
241
end
240
242
241
243
% Initialize Eyelink system and connection: returns 1 when succesful, 0
242
244
% otherwise
243
245
if ~EyelinkInit(0 , 1 )
246
+ Eyelink(' shutdown' );
244
247
fprintf(' Eyelink Init aborted.\n ' );
245
248
return
246
249
end
You can’t perform that action at this time.
0 commit comments