Commit 620738e2 authored by Jesse Heckman's avatar Jesse Heckman
Browse files

Build LSL plugin

parent 723f472f
No preview for this file type
......@@ -29,7 +29,6 @@ function pb_vRunExp(handles)
[ses,str] = pb_runLSL;
%% CORE BODY
% iterate experiment
......@@ -97,7 +96,7 @@ function pb_vRunExp(handles)
LSL_Dat.pl_dat = str(2).read;
LSL_Dat.ot_dat = str(3).read;
% SAVE LSL DATA
% TODO: SAVE LSL DATA
end
%% CHECK OUT
......
function ses = pb_runLSL(varargin)
function [ses,str] = pb_runLSL()
% PB_RUNLSL()
%
% PB_RUNLSL() creates a LSL session for VC.
......@@ -14,7 +14,7 @@ function ses = pb_runLSL(varargin)
ses = lsl_session();
str = lsl_istream.empty(0,3);
for iStrm = 1:length(streams)
for iStrm = 1:2 %length(streams)
% Find, select and make streams for LSL.
tmp = strrep(streams(iStrm),'type=''','');
tmp = tmp{1}(1:find(tmp{1} == '@',1)-2);
......@@ -34,22 +34,22 @@ function ses = pb_runLSL(varargin)
addlistener(str(1),'DataAvailable', @ev_listener);
addlistener(str(2),'DataAvailable', @pl_listener);
addlistener(str(3),'DataAvailable', @ot_listener);
%addlistener(str(3),'DataAvailable', @ot_listener);
end
function ev_listener(src, event)
function ev_listener(~, event)
disp('ev_listener called')
event
disp(event);
end
function pl_listener(src, event)
function pl_listener(~, event)
disp('pl_listener called');
event
disp(event);
end
function ot_listener(src, event)
function ot_listener(~, event)
disp('ot_listener called');
event
disp(event);
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
......
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