Commit b2cf9bf0 authored by Jesse Heckman's avatar Jesse Heckman
Browse files

implement wait for trigger

parent a9500ae1
......@@ -12,13 +12,16 @@ function pb_vRunTrial(zbus, cfg)
%% Trigger event 1
zbus.zBusTrigB(0, 0, 2); % start event 1/trial onset; trigger zBus 4 = RA16;
%% Button Press
disp('Waiting for RZ6 button press/sound/led/acquisition');
t = tic;
trialdur = cfg.trialdur;
if cfg.trig; trialdur = 10; end
while toc(t) < trialdur
if cfg.trig
while ~cfg.RZ6_1.GetTagVal('Wait'); pause(0.05); end
while toc(t) < trialdur; pause(0.05); end
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