-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestSetup.m
More file actions
44 lines (36 loc) · 1.09 KB
/
testSetup.m
File metadata and controls
44 lines (36 loc) · 1.09 KB
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
38
39
40
41
42
43
44
function [] = testSetup()
% Clear the screen
sca;
close all;
%% Create the globals structure
runIdx = 1;
subjectIdx = 40;
%% Set the globals
globals = setGlobals(subjectIdx,runIdx);
%% Set-up PsychToolbox
globals = setUp(globals);
penWidthPixels = 6;
allowableKeys = [globals.downKey, globals.upKey];
%% Draw the rect to the screen
Screen('FrameRect', globals.window, [0,0,1].*globals.white, ...
globals.xyEdgesScrn, penWidthPixels);
Screen('FrameRect', globals.window, [0,0,1].*globals.white, ...
globals.xyEdgesStim, penWidthPixels);
Screen('FrameRect', globals.window, [0,0,1].*globals.white, ...
globals.xyEdgesFrameMid, penWidthPixels);
Screen('FrameRect', globals.window, [0,1,0].*globals.white, ...
globals.xyEdgesNumRight, penWidthPixels);
Screen('FrameRect', globals.window, [1,0,0].*globals.white, ...
globals.xyEdgesNumLeft, penWidthPixels);
%% Flip to the screen
Screen('Flip', globals.window);
%% Wait for screen
kbIds = liKeyWait(allowableKeys,Inf);
keyNames = KbName(kbIds);
disp(keyNames);
disp(kbIds);
KbStrokeWait;
%% Clear the screen
sca;
Screen('CloseAll');
return