Skip to content

Commit aee9c54

Browse files
committed
refactor experiment section
1 parent 52576dd commit aee9c54

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

audioLocTranslational.m

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
% % Convert some values from degrees to pixels
3737
% cfg = deg2Pix('diameterAperture', cfg, cfg);
3838
% expParameters = deg2Pix('dotSize', expParameters, cfg);
39-
%
40-
%
39+
40+
4141
[el] = eyeTracker('Calibration', cfg, expParameters);
4242

4343
% % % REFACTOR THIS FUNCTION
@@ -66,7 +66,33 @@
6666

6767
end
6868

69+
% Wait for space key to be pressed
70+
pressSpace4me
71+
72+
% prepare the KbQueue to collect responses
73+
getResponse('init', cfg, expParameters, 1);
74+
getResponse('start', cfg, expParameters, 1);
75+
76+
% Show instructions
77+
if expParameters.Task1
78+
DrawFormattedText(cfg.win,expParameters.TaskInstruction,...
79+
'center', 'center', cfg.textColor);
80+
Screen('Flip', cfg.win);
81+
end
82+
83+
% Wait for Trigger from Scanner
84+
wait4Trigger(cfg)
85+
86+
% Show the fixation cross
87+
if expParameters.Task1
88+
drawFixationCross(cfg, expParameters, expParameters.fixationCrossColor)
89+
Screen('Flip',cfg.win);
90+
end
91+
92+
%% Experiment Start
93+
cfg.experimentStart = GetSecs;
6994

95+
WaitSecs(expParameters.onsetDelay);
7096

7197
catch
7298

0 commit comments

Comments
 (0)