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()
1616 % Screen Close All
1717 sca ;
1818
19- % Shut down connection with Eyelink
20- try
21- Eyelink(' shutdown' );
22- catch
23- end
24-
2519 % Close Psychportaudio if open
2620 if PsychPortAudio(' GetOpenDeviceCount' ) ~= 0
2721 PsychPortAudio(' Close' );
Original file line number Diff line number Diff line change 228228 % Exit program if this fails.
229229 elInit = Eyelink(' Initialize' );
230230 if elInit ~= 0
231+ Eyelink(' shutdown' );
231232 error([newline ' Eyelink is not initialized, aborted.' ]);
232233 end
233234
234235 % Make sure EL is still connected: returns 1 if connected, -1 if dummy-connected,
235236 % 2 if broadcast-connected and 0 if not connected. Exit program if this fails.
236237 elConnection = Eyelink(' IsConnected' );
237238 if elConnection ~= 1
239+ Eyelink(' shutdown' );
238240 error([newline ' Eyelink is not connected, aborted.' ]);
239241 end
240242
241243 % Initialize Eyelink system and connection: returns 1 when succesful, 0
242244 % otherwise
243245 if ~EyelinkInit(0 , 1 )
246+ Eyelink(' shutdown' );
244247 fprintf(' Eyelink Init aborted.\n ' );
245248 return
246249 end
You can’t perform that action at this time.
0 commit comments