Skip to content
GitLab
Menu
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
a733b2aa
Commit
a733b2aa
authored
Oct 29, 2018
by
Jesse Heckman
Browse files
update LSL
parent
f25e9dea
Changes
2
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/core/pb_vRunExp.m
View file @
a733b2aa
...
...
@@ -24,11 +24,11 @@ function pb_vRunExp(handles)
% set block information
block
=
handles
.
block
;
nblocks
=
handles
.
cfg
.
Blocks
;
Dat
(
nblocks
)
=
struct
(
'VS'
,[],
'EV'
,[],
'PL'
,[],
'
OT
'
,[],
'
LSL
'
,[]);
Dat
(
nblocks
)
=
struct
(
'VS'
,[],
'EV'
,[],
'PL
_Gaze
'
,[],
'
PL_Python
'
,[],
'
OT
'
,[]);
% initialize recordings
% rc = pb_runPupil;
%
[ses,streams] = pb_runLSL('ot',false);
[
ses
,
streams
]
=
pb_runLSL
(
'ot'
,
false
);
experimentTime
=
tic
;
%% START BLOCK
...
...
@@ -46,8 +46,8 @@ function pb_vRunExp(handles)
Dat
(
iBlck
)
.
VS
=
sig
;
% start recording
%
pb_startLSL(ses);
%
pb_startPupil(rc);
pb_startLSL
(
ses
);
%
pb_startPupil(rc);
% start vestibular chair
if
~
ismac
&&
~
debug
...
...
subtools/lsl/pb_runLSL.m
View file @
a733b2aa
...
...
@@ -9,17 +9,20 @@ function [ses,str] = pb_runLSL(varargin)
de
=
pb_keyval
(
'de'
,
varargin
,
true
);
pl
=
pb_keyval
(
'pl'
,
varargin
,
true
);
gz
=
pb_keyval
(
'gz'
,
varargin
,
true
);
ot
=
pb_keyval
(
'ot'
,
varargin
,
true
);
tmp
=
{};
streams
=
{
'type=
''
Digital Events @ lslder01
''
and name=
''
Digital Events 0
''
'
,
...
'type=
''
Pupil Capture @ pupil-desktop
''
and name=
''
Pupil Python Representation - Eye 0
''
'
,
...
'type=
''
Pupil Capture @ pupil-desktop
''
and name=
''
Gaze Python Representation
''
'
,
...
'type=
''
OptiTrack Mocap @ DCN-VSO3
''
and name=
''
Labeled Markers
''
'
};
if
de
;
tmp
(
end
+
1
)
=
streams
(
1
);
end
if
pl
;
tmp
(
end
+
1
)
=
streams
(
2
);
end
if
ot
;
tmp
(
end
+
1
)
=
streams
(
3
);
end
if
gz
;
tmp
(
end
+
1
)
=
streams
(
3
);
end
if
ot
;
tmp
(
end
+
1
)
=
streams
(
4
);
end
streams
=
tmp
;
...
...
@@ -49,6 +52,7 @@ function [ses,str] = pb_runLSL(varargin)
c
=
1
;
if
de
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
ev_listener
);
c
=
c
+
1
;
end
if
pl
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
pl_listener
);
c
=
c
+
1
;
end
if
gz
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
gz_listener
);
c
=
c
+
1
;
end
if
ot
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
ot_listener
);
end
end
...
...
@@ -62,6 +66,11 @@ function pl_listener(~, event)
%disp(event);
end
function
gz_listener
(
~
,
event
)
disp
(
'pl_listener called'
);
%disp(event);
end
function
ot_listener
(
~
,
event
)
disp
(
'ot_listener called'
);
%disp(event);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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