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