Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jesse Heckman
pbtoolbox
Commits
723f472f
Commit
723f472f
authored
Oct 16, 2018
by
Jesse Heckman
Browse files
Build LSL plugin
parent
b1dd056e
Changes
2
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/core/pb_vRunExp.m
View file @
723f472f
...
...
@@ -11,7 +11,7 @@ function pb_vRunExp(handles)
%% INITIALIZE
% load & read experiment
debug
=
fals
e
;
debug
=
tru
e
;
experimentTime
=
tic
;
pb_setupShow
(
handles
);
...
...
@@ -24,10 +24,11 @@ function pb_vRunExp(handles)
nblocks
=
handles
.
cfg
.
Blocks
;
bDat
(
nblocks
)
=
struct
(
'v'
,[],
'h'
,[]);
% rc = pb_runPupil;
% pb_startPupil(rc);
rc
=
pb_runPupil
;
pb_startPupil
(
rc
);
[
ses
,
str
]
=
pb_runLSL
;
% ses = pb_runLSL;
%% CORE BODY
% iterate experiment
...
...
@@ -35,7 +36,7 @@ function pb_vRunExp(handles)
for
iBlck
=
1
:
nblocks
% Runs blocks of trials with a vestibular condition
%
ses.start
()
;
ses
.
start
;
nTrials
=
length
(
block
(
iBlck
)
.
trial
);
handles
=
updateCount
(
handles
,
'trial'
,
'reset'
);
...
...
@@ -84,9 +85,24 @@ function pb_vRunExp(handles)
Dat
.
pv
=
pv
;
end
handles
=
updateCount
(
handles
,
'block'
,
'count'
);
% STOP LSL
ses
.
stop
;
if
~
exist
(
'LSL_Dat'
,
'var'
)
LSL_Data
=
{};
end
LSL_Dat
.
ev_dat
=
str
(
1
)
.
read
;
LSL_Dat
.
pl_dat
=
str
(
2
)
.
read
;
LSL_Dat
.
ot_dat
=
str
(
3
)
.
read
;
% SAVE LSL DATA
end
%% CHECK OUT
%pb_stopPupil(rc);
pb_stopPupil
(
rc
);
pb_vEndExp
(
handles
.
cfg
);
pb_vInitialize
(
handles
,
false
);
toc
(
experimentTime
)
...
...
subtools/lsl/pb_runLSL.m
View file @
723f472f
function
ses
=
pb_runLSL
()
function
ses
=
pb_runLSL
(
varargin
)
% PB_RUNLSL()
%
% PB_RUNLSL() creates a LSL session for VC.
...
...
@@ -7,7 +7,7 @@ function ses = pb_runLSL()
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
streams
=
{
'type=
''
Digital Events @ lslder0
0
''
and name=
''
Digital Events 1
''
'
,
...
streams
=
{
'type=
''
Digital Events @ lslder0
1
''
and name=
''
Digital Events 1
''
'
,
...
'type=
''
Pupil Capture @ pupil-desktop.local
''
and name=
''
Pupil Primitive Data - Eye 0
''
'
,
...
'type=
''
OptiTrack Mocap @ DCN-VSO3
''
and name=
''
Labeled Markers
''
'
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment