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