-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRecalibrate.m
More file actions
26 lines (19 loc) · 796 Bytes
/
Recalibrate.m
File metadata and controls
26 lines (19 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FlushEvents;
[~,~,keyCode,~] = KbCheck;
if( find(keyCode)== 67 ) % 'C' key
PsychPortAudio('Close');
disp('RECALIBRATING!')
Tobii_calibration_with_psychtoolbox;
tetio_startTracking;
mOrder = randperm(Calib.points.n);
EyeErrorTestStart=TestEyeTrackerError(Calib,mOrder,Constants);
InitializePsychSound(1);
[pahandle, buffer]=LoadSoundSchedule(wavfilenames,Constants.audiodir);
PsychPortAudio('UseSchedule', pahandle, 1);
%we need to determine the appropriate sound to play for this trial
if(Constants.TrainHiLo==3)
PsychPortAudio('AddToSchedule', pahandle, buffer(AudioStimList(trial)+1), 1);
else
PsychPortAudio('AddToSchedule', pahandle, buffer(randi(length(wavfilenames))), 1);
end
end