From d5f8a5fb98118756ae7e9f1dc40c30d05e5ca83d Mon Sep 17 00:00:00 2001 From: Jesse Heckman Date: Thu, 13 Jun 2019 13:19:43 +0200 Subject: [PATCH] implement wait for trigger --- .../vPrime/core/experiment/block/trial/pb_vRunTrial.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vRunTrial.m b/setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vRunTrial.m index 2a0a04c..2ecf25f 100644 --- a/setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vRunTrial.m +++ b/setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vRunTrial.m @@ -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 % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % -- GitLab