-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_task.m
More file actions
58 lines (53 loc) · 1.65 KB
/
run_task.m
File metadata and controls
58 lines (53 loc) · 1.65 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function topNode = run_task(location, blocks, type, subjcode)
%% function [mainTreeNode, datatub] = run_task(location)
%
% run_task = auditory change-point task
%
% This function configures, initializes, runs, and cleans up an Audio2AFCCP
% task experiment
%
% 04/02/19 aer wrote it
%% ---- Clear globals
%
% umm, duh
clear globals
%% ---- Configure experiment based on location
%
% locations are 'pilot'
%
% UIs:
% 'dotsReadableEyeEyelink'
% 'dotsReadableEyePupilLabs'
% 'dotsReadableEyeEOG'
% 'dotsReadableHIDKeyboard'
% 'dotsReadableEyeMouseSimulator'
% 'dotsReadableHIDButtons'
% 'dotsReadableHIDGamepad'
switch location
case {'EMU'}
arglist = { ...
'taskSpecs', {blocks, type}, ...
'subjectCode', subjcode, ...
'readables', {'customButtonsClass'}, ...
'displayIndex', 1, ... % 0=small, 1=main, 2=other screen
'remoteDrawing', false, ...
'sendTTLs', true, ...
'buttonBox', 'EMU'
};
case {'office'}
arglist = { ...
'taskSpecs', {blocks, type}, ...
'subjectCode', subjcode, ...
'readables', {'customButtonsClass'}, ...
'displayIndex', 1, ... % 0=small, 1=main, 2=other screen
'remoteDrawing', false, ...
'sendTTLs', false, ...
'buttonBox', 'Gold' % options are Gold, EMU and GoldOnEMUlaptop
};
end
%% ---- Call the configuration routine
%
topNode = configure_task(arglist{:});
%% ---- Run it!
%
topNode.run();