Commit 75c55ae2 authored by Jesse Heckman's avatar Jesse Heckman
Browse files

add LSL

parent ebb6cb35
......@@ -30,7 +30,6 @@ function pb_vRunExp(handles)
%% CORE BODY
% iterate experiment
for iBlck = 1:nblocks
% Runs blocks of trials with a vestibular condition
......@@ -59,7 +58,6 @@ function pb_vRunExp(handles)
[stim, cfg] = pb_vSetupTrial(stim, handles.cfg);
pb_vRunTrial(handles.cfg, stim);
% pb_trialclean(stim, cfg);
% pb_vFeedbackGUI(); %% <-- MAYBE NOT NECESSAIRY?
pb_vTraces(handles);
......
function ses = pb_runLSL()
% PB_RUNLSL()
%
% PB_RUNLSL() ...
%
% See also ...
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
streams = {'type=''Digital Events @ lslder00'' and name=''Digital Events 1''', ...
'type=''Pupil Capture @ pupil-hpdesktop'' and name=''Pupil Primitive Data - Eye 0''', ...
'type=''Optitrack @ MOTIVE'' and name=''Motive Data'''};
ses = lsl_session();
str = double.empty(0,3);
for iStrm = 1:length(streams)
% Find, select and make streams for LSL.
info = lsl_streaminfos(streams{iStrm});
l = info.list();
if isempty(l); error('No streams found'); end
for iList = 1:size(l ,1)
fprintf('%d: name: ''%s'' type: ''%s''\n',iList,l{iList}.name,l{iList}.type);
end
str(iStrm) = lsl_istream(info{1});
ses.add_stream(str(iStrm));
end
addlistener(str(1),'DataAvailable',@ev_listener);
addlistener(str(2),'DataAvailable',@pl_listener);
% addlistener(str(3),'DataAvailable',@ot_listener);
end
function ev_listener(src, event)
% disp('ev_listener called')
event
end
function pl_listener(src, event)
% disp('pl_listener called');
% event
end
function ot_listener(src, event)
% disp('ot_listener called');
% event
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% %
% Part of Programmeer Beer Toolbox (PBToolbox) %
% Written by: Jesse J. Heckman (2018) %
% %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
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