File size: 1,043 Bytes
227148b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function trial = runConditionNotice(disp_struct, task_struct, trial, ioObject, LTP1address)
    % define the text font
    Screen('TextSize', disp_struct.wPtr, 60);
    Screen('TextFont', disp_struct.wPtr, 'Times');
    Screen('TextStyle', disp_struct.wPtr, 0);
    Screen('TextColor', disp_struct.wPtr, [255 255 255]);
    Screen('FillRect', disp_struct.wPtr,[0 0 0]);
    
    if trial(task_struct.cTrialCond) == task_struct.FC
        % free choice trial
        condText = 'Choose';
        io64(ioObject,LTP1address,1); WaitSecs(.05); io64(ioObject,LTP1address,0);
    else
        % no-choice trial
        Screen('TextColor', disp_struct.wPtr, [0 0 255]);
        condText = 'Match';
        io64(ioObject,LTP1address,2); WaitSecs(.05); io64(ioObject,LTP1address,0);
    end
    
    DrawFormattedText(disp_struct.wPtr, condText, 'center', 'center');
    Screen(disp_struct.wPtr, 'Flip');
    WaitSecs(0.5);
    
    % clear
    Screen(disp_struct.wPtr, 'Flip');
    Screen('TextColor', disp_struct.wPtr, [255 255 255]);

end % function