Skip to content

Commit 9454d50

Browse files
Merge pull request #63 from marcobarilari/marco_implement-ET-tags
add eye tracker tags
2 parents 2304925 + 8f0f815 commit 9454d50

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

visualLocTranslational.m

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
waitForTrigger(cfg);
6161

6262
%% Experiment Start
63+
64+
eyeTracker('StartRecording', cfg);
65+
6366
cfg = getExperimentStart(cfg);
6467

6568
getResponse('start', cfg.keyboard.responseBox);
@@ -72,7 +75,7 @@
7275

7376
fprintf('\n - Running Block %.0f \n', iBlock);
7477

75-
eyeTracker('StartRecording', cfg);
78+
eyeTracker('Message', cfg, ['start_block-', num2str(iBlock)]);
7679

7780
% For each event in the block
7881
for iEvent = 1:cfg.design.nbEventsPerBlock
@@ -91,6 +94,9 @@
9194
cfg.pacedByTriggers.nbTriggers);
9295
end
9396

97+
eyeTracker('Message', cfg, ...
98+
['start_trial-', num2str(iEvent), '_', thisEvent.trial_type]);
99+
94100
% play the dots and collect onset and duraton of the event
95101
[onset, duration] = doDotMo(cfg, thisEvent, thisFixation);
96102

@@ -111,12 +117,13 @@
111117
triggerString = ['trigger_' cfg.design.blockNames{iBlock}];
112118
saveResponsesAndTriggers(responseEvents, cfg, logFile, triggerString);
113119

120+
eyeTracker('Message', cfg, ...
121+
['end_trial-', num2str(iEvent), '_', thisEvent.trial_type]);
122+
114123
waitFor(cfg, cfg.timing.ISI);
115124

116125
end
117126

118-
eyeTracker('StopRecordings', cfg);
119-
120127
% "prepare" cross for the baseline block
121128
% if MT / MST this allows us to set the cross at the position of the next block
122129
if iBlock < cfg.design.nbBlocks
@@ -128,6 +135,8 @@
128135
drawFixation(thisFixation);
129136
Screen('Flip', cfg.screen.win);
130137

138+
eyeTracker('Message', cfg, ['end_block-', num2str(iBlock)]);
139+
131140
waitFor(cfg, cfg.timing.IBI);
132141

133142
% trigger monitoring
@@ -144,6 +153,8 @@
144153

145154
cfg = getExperimentEnd(cfg);
146155

156+
eyeTracker('StopRecordings', cfg);
157+
147158
% Close the logfiles
148159
saveEventsFile('close', cfg, logFile);
149160

0 commit comments

Comments
 (0)