Commit 236657f4 authored by Jesse Heckman's avatar Jesse Heckman

implement wait for trigger

parent fba98513
......@@ -17,11 +17,13 @@ function pb_vRunTrial(zbus, cfg)
disp('Waiting for RZ6 button press/sound/led/acquisition');
t = tic;
while ~cfg.RZ6_1.GetTagVal('Wait'); pause(0.05); end
trialdur = cfg.trialdur;
if cfg.trig
while ~cfg.RZ6_1.GetTagVal('Wait'); pause(0.05); end
else
while toc(t) < trialdur; pause(0.05); end
if cfg.trig; trialdur = 15; end
while toc(t) < trialdur || cfg.RZ6_1.GetTagVal('Active')
pause(0.05);
end
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