Skip to content

Commit e3207aa

Browse files
committed
add task 2 WIP and change task 1 variables
1 parent 9914fba commit e3207aa

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

subfun/doAuditoryMotion.m

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,34 @@
1818
%% Get parameters
1919

2020
direction = thisEvent.direction(1);
21-
isTarget = thisEvent.target(1);
21+
isFixationTarget = thisEvent.fixationTarget(1);
2222
targetDuration = cfg.target.duration;
2323

24+
% % % WIP % % %
25+
26+
% isSoundTarget = thisEvent.soundTarget(1);
27+
28+
% % % WIP % % %
29+
2430
soundData = cfg.soundData;
2531

2632
switch direction
2733
case -1
2834
fieldName = 'S';
29-
case 90
30-
fieldName = 'U';
31-
case 270
32-
fieldName = 'D';
3335
case 0
34-
fieldName = 'R';
36+
fieldName = 'LRL';
3537
case 180
36-
fieldName = 'L';
38+
fieldName = 'RLR';
3739
end
3840

39-
if isTarget == 1
41+
% % % WIP % % %
42+
43+
if isSoundTarget == 1
4044
fieldName = [fieldName '_T'];
4145
end
46+
47+
% % % WIP % % %
48+
4249

4350
sound = soundData.(fieldName);
4451

@@ -51,7 +58,7 @@
5158
% ideally we would want to synch that first time stamp and the sound start
5259
thisFixation.fixation = cfg.fixation;
5360
thisFixation.screen = cfg.screen;
54-
if isTarget == 1
61+
if isFixationTarget == 1
5562
thisFixation.fixation.color = cfg.fixation.colorTarget;
5663
end
5764
drawFixation(thisFixation);
@@ -62,7 +69,7 @@
6269
% set default cross cross color but update if target time is not
6370
% finished
6471
thisFixation.fixation.color = cfg.fixation.color;
65-
if GetSecs < (onset + targetDuration) && isTarget == 1
72+
if GetSecs < (onset + targetDuration) && isFixationTarget == 1
6673
thisFixation.fixation.color = cfg.fixation.colorTarget;
6774
end
6875

0 commit comments

Comments
 (0)