Commit 723f472f authored by Jesse Heckman's avatar Jesse Heckman
Browse files

Build LSL plugin

parent b1dd056e
......@@ -11,7 +11,7 @@ function pb_vRunExp(handles)
%% INITIALIZE
% load & read experiment
debug = false;
debug = true;
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)
......
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 @ lslder00'' and name=''Digital Events 1''', ...
streams = {'type=''Digital Events @ lslder01'' 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'''};
......
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