|
60 | 60 | waitForTrigger(cfg); |
61 | 61 |
|
62 | 62 | %% Experiment Start |
| 63 | + |
| 64 | + eyeTracker('StartRecording', cfg); |
| 65 | + |
63 | 66 | cfg = getExperimentStart(cfg); |
64 | 67 |
|
65 | 68 | getResponse('start', cfg.keyboard.responseBox); |
|
72 | 75 |
|
73 | 76 | fprintf('\n - Running Block %.0f \n', iBlock); |
74 | 77 |
|
75 | | - eyeTracker('StartRecording', cfg); |
| 78 | + eyeTracker('Message', cfg, ['start_block-', num2str(iBlock)]); |
76 | 79 |
|
77 | 80 | % For each event in the block |
78 | 81 | for iEvent = 1:cfg.design.nbEventsPerBlock |
|
91 | 94 | cfg.pacedByTriggers.nbTriggers); |
92 | 95 | end |
93 | 96 |
|
| 97 | + eyeTracker('Message', cfg, ... |
| 98 | + ['start_trial-', num2str(iEvent), '_', thisEvent.trial_type]); |
| 99 | + |
94 | 100 | % play the dots and collect onset and duraton of the event |
95 | 101 | [onset, duration] = doDotMo(cfg, thisEvent, thisFixation); |
96 | 102 |
|
|
111 | 117 | triggerString = ['trigger_' cfg.design.blockNames{iBlock}]; |
112 | 118 | saveResponsesAndTriggers(responseEvents, cfg, logFile, triggerString); |
113 | 119 |
|
| 120 | + eyeTracker('Message', cfg, ... |
| 121 | + ['end_trial-', num2str(iEvent), '_', thisEvent.trial_type]); |
| 122 | + |
114 | 123 | waitFor(cfg, cfg.timing.ISI); |
115 | 124 |
|
116 | 125 | end |
117 | 126 |
|
118 | | - eyeTracker('StopRecordings', cfg); |
119 | | - |
120 | 127 | % "prepare" cross for the baseline block |
121 | 128 | % if MT / MST this allows us to set the cross at the position of the next block |
122 | 129 | if iBlock < cfg.design.nbBlocks |
|
128 | 135 | drawFixation(thisFixation); |
129 | 136 | Screen('Flip', cfg.screen.win); |
130 | 137 |
|
| 138 | + eyeTracker('Message', cfg, ['end_block-', num2str(iBlock)]); |
| 139 | + |
131 | 140 | waitFor(cfg, cfg.timing.IBI); |
132 | 141 |
|
133 | 142 | % trigger monitoring |
|
144 | 153 |
|
145 | 154 | cfg = getExperimentEnd(cfg); |
146 | 155 |
|
| 156 | + eyeTracker('StopRecordings', cfg); |
| 157 | + |
147 | 158 | % Close the logfiles |
148 | 159 | saveEventsFile('close', cfg, logFile); |
149 | 160 |
|
|
0 commit comments