Commit a733b2aa authored by Jesse Heckman's avatar Jesse Heckman
Browse files

update LSL

parent f25e9dea
...@@ -24,11 +24,11 @@ function pb_vRunExp(handles) ...@@ -24,11 +24,11 @@ function pb_vRunExp(handles)
% set block information % set block information
block = handles.block; block = handles.block;
nblocks = handles.cfg.Blocks; nblocks = handles.cfg.Blocks;
Dat(nblocks) = struct('VS',[],'EV',[],'PL',[],'OT',[],'LSL',[]); Dat(nblocks) = struct('VS',[],'EV',[],'PL_Gaze',[],'PL_Python',[],'OT',[]);
% initialize recordings % initialize recordings
% rc = pb_runPupil; % rc = pb_runPupil;
% [ses,streams] = pb_runLSL('ot',false); [ses,streams] = pb_runLSL('ot',false);
experimentTime = tic; experimentTime = tic;
%% START BLOCK %% START BLOCK
...@@ -46,8 +46,8 @@ function pb_vRunExp(handles) ...@@ -46,8 +46,8 @@ function pb_vRunExp(handles)
Dat(iBlck).VS = sig; Dat(iBlck).VS = sig;
% start recording % start recording
% pb_startLSL(ses); pb_startLSL(ses);
% pb_startPupil(rc); %pb_startPupil(rc);
% start vestibular chair % start vestibular chair
if ~ismac && ~debug if ~ismac && ~debug
......
...@@ -9,17 +9,20 @@ function [ses,str] = pb_runLSL(varargin) ...@@ -9,17 +9,20 @@ function [ses,str] = pb_runLSL(varargin)
de = pb_keyval('de', varargin, true); de = pb_keyval('de', varargin, true);
pl = pb_keyval('pl', varargin, true); pl = pb_keyval('pl', varargin, true);
gz = pb_keyval('gz', varargin, true);
ot = pb_keyval('ot', varargin, true); ot = pb_keyval('ot', varargin, true);
tmp = {}; tmp = {};
streams = {'type=''Digital Events @ lslder01'' and name=''Digital Events 0''', ... 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=''Pupil Python Representation - Eye 0''', ...
'type=''Pupil Capture @ pupil-desktop'' and name=''Gaze Python Representation''', ...
'type=''OptiTrack Mocap @ DCN-VSO3'' and name=''Labeled Markers'''}; 'type=''OptiTrack Mocap @ DCN-VSO3'' and name=''Labeled Markers'''};
if de; tmp(end+1) = streams(1); end if de; tmp(end+1) = streams(1); end
if pl; tmp(end+1) = streams(2); 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; streams = tmp;
...@@ -49,6 +52,7 @@ function [ses,str] = pb_runLSL(varargin) ...@@ -49,6 +52,7 @@ function [ses,str] = pb_runLSL(varargin)
c = 1; c = 1;
if de; addlistener(str(c),'DataAvailable', @ev_listener); c = c+1; end 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 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 if ot; addlistener(str(c),'DataAvailable', @ot_listener); end
end end
...@@ -62,6 +66,11 @@ function pl_listener(~, event) ...@@ -62,6 +66,11 @@ function pl_listener(~, event)
%disp(event); %disp(event);
end end
function gz_listener(~, event)
disp('pl_listener called');
%disp(event);
end
function ot_listener(~, event) function ot_listener(~, event)
disp('ot_listener called'); disp('ot_listener called');
%disp(event); %disp(event);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment