Commit 0f166b54 authored by Jesse Heckman's avatar Jesse Heckman

implement wait for trigger

parent f766f961
...@@ -11,7 +11,7 @@ function [stim, cfg] = pb_vSetupTrial(stim,cfg) ...@@ -11,7 +11,7 @@ function [stim, cfg] = pb_vSetupTrial(stim,cfg)
%% SET TDT PARAMETERS %% SET TDT PARAMETERS
selled = strcmpi({stim.modality},'LED'); selled = strcmpi({stim.modality},'LED');
selsnd = strcmpi({stim.modality},'sound'); selsnd = strcmpi({stim.modality},'sound');
seltrg = strcmpi({stim.modality},'TRG0'); seltrg = strcmpi({stim.modality},'trigger');
%% LED %% LED
if any(selled) if any(selled)
......
...@@ -93,7 +93,7 @@ function [block,cfg] = pb_vReadExp(cfg) ...@@ -93,7 +93,7 @@ function [block,cfg] = pb_vReadExp(cfg)
block(bn).trial(tn).stim(sn).modality = 'trigger'; block(bn).trial(tn).stim(sn).modality = 'trigger';
if par(1) == 1 if par(1) == 1
block(bn).trial(tn).stim(sn).detect = 'rise'; block(bn).trial(tn).stim(sn).detect = 'rise';
elseif par==2 elseif par(1)==2
block(bn).trial(tn).stim(sn).detect = 'fall'; block(bn).trial(tn).stim(sn).detect = 'fall';
end end
block(bn).trial(tn).stim(sn).channel = par(2); block(bn).trial(tn).stim(sn).channel = par(2);
......
...@@ -14,7 +14,7 @@ function pb_vRunExp(handles) ...@@ -14,7 +14,7 @@ function pb_vRunExp(handles)
% load & read experiment % load & read experiment
% set debug mode % set debug mode
debug = false; debug = true;
% set handles % set handles
pb_setupShow(handles); pb_setupShow(handles);
...@@ -24,13 +24,17 @@ function pb_vRunExp(handles) ...@@ -24,13 +24,17 @@ function pb_vRunExp(handles)
handles = pb_vInitialize(handles, true); handles = pb_vInitialize(handles, true);
% set block information % set block information
block = handles.block; if ~debug
nblocks = handles.cfg.Blocks; block = handles.block;
Dat = pb_dataobj(nblocks); nblocks = handles.cfg.Blocks;
Dat = pb_dataobj(nblocks);
end
% initialize recordings % initialize recordings
rc = pb_runPupil; if ~debug
[ses,str] = pb_runLSL; rc = pb_runPupil;
[ses,str] = pb_runLSL;
end
expTime = tic; expTime = tic;
%% START BLOCK %% START BLOCK
......
Markdown is supported
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