|
78 | 78 |
|
79 | 79 | eyeTracker('Message', cfg, ['start_block-', num2str(iBlock)]); |
80 | 80 | dots=[]; |
81 | | - previousEvent.target = []; |
| 81 | + previousEvent.target = 0; |
82 | 82 | % For each event in the block |
83 | 83 | for iEvent = 1:cfg.design.nbEventsPerBlock |
84 | 84 |
|
|
99 | 99 | eyeTracker('Message', cfg, ... |
100 | 100 | ['start_trial-', num2str(iEvent), '_', thisEvent.trial_type]); |
101 | 101 |
|
102 | | - if ~strcmp(cfg.target.type, 'static_repeat') |
103 | 102 | % we want to initialize the dots position when targets type is fixation cross |
104 | 103 | % or if this the first event of a target pair |
105 | | - if ~strcmp(cfg.target.type, 'static_repeat') || ... |
106 | | - thisEvent.target ~= previousEvent.target |
| 104 | + if strcmp(cfg.target.type, 'static_repeat') && ... |
| 105 | + thisEvent.target == previousEvent.target |
| 106 | + else |
107 | 107 | dots = []; |
108 | 108 | end |
| 109 | + |
109 | 110 | % play the dots and collect onset and duraton of the event |
110 | 111 | [onset, duration, dots] = doDotMo(cfg, thisEvent, thisFixation, dots); |
111 | 112 |
|
|
129 | 130 | eyeTracker('Message', cfg, ... |
130 | 131 | ['end_trial-', num2str(iEvent), '_', thisEvent.trial_type]); |
131 | 132 |
|
132 | | - previousEvent = thisEvent; |
| 133 | + previousEvent = thisEvent; |
133 | 134 |
|
134 | 135 | waitFor(cfg, cfg.timing.ISI); |
135 | 136 |
|
|
0 commit comments