-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestSetup.m
More file actions
37 lines (28 loc) · 853 Bytes
/
testSetup.m
File metadata and controls
37 lines (28 loc) · 853 Bytes
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
29
30
31
32
33
34
35
36
37
function [] = testSetup()
% Clear the screen
sca;
close all;
%% Create the globals structure
clear global;
globals = struct;
globals.SubjectId = '47fed925';
%% Set the globals
globals = setGlobals(globals);
%% Set-up PsychToolbox
setUp(globals.window);
penWidthPixels = 6;
allowableKeys = [globals.scrollKey, globals.acceptKey];
%% Draw the rect to the screen
Screen('FrameRect', globals.window, [0,0,1].*globals.white, globals.xyEdgesScrn, penWidthPixels)
Screen('FrameRect', globals.window, [0,1,0].*globals.white, globals.xyEdgesResp, penWidthPixels)
Screen('FrameRect', globals.window, [1,0,0].*globals.white, globals.xyEdgesCues, penWidthPixels)
%% Flip to the screen
Screen('Flip', globals.window);
kbIds = liKeyWait(allowableKeys,Inf);
keyNames = KbName(kbIds);
disp(keyNames);
disp(kbIds);
KbStrokeWait;
%% Clear the screen
sca;
return