Commit bbed4310 authored by Jesse Heckman's avatar Jesse Heckman

implement wait for trigger

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