Commit d5f8a5fb authored by Jesse Heckman's avatar Jesse Heckman

implement wait for trigger

parent 236657f4
......@@ -17,14 +17,10 @@ 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; trialdur = 15; end
while toc(t) < trialdur || cfg.RZ6_1.GetTagVal('Active')
pause(0.05);
end
if cfg.trig; trialdur = 10; end
while ~cfg.RZ6_1.GetTagVal('Wait') || toc(t) < trialdur; 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