---
 hardware/rigol-ds/protocol.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hardware/rigol-ds/protocol.c b/hardware/rigol-ds/protocol.c
index 24abe65..c9f3b3c 100644
--- a/hardware/rigol-ds/protocol.c
+++ b/hardware/rigol-ds/protocol.c
@@ -110,15 +110,15 @@ static int rigol_ds_trigger_wait(const struct sr_dev_inst 
*sdi)
         * If timebase < 50 msecs/DIV just sleep about one sweep time except
         * for really fast sweeps.
         */
-       if (devc->timebase < 0.0499)
+       if (devc->trigger_wait_status == 1 && devc->timebase < 0.0499)
        {
                if (devc->timebase > 0.99e-6) {
                        /*
-                        * Timebase * num hor. divs * 100(%) * 1e6(usecs) / 85
+                        * Timebase * num hor. divs * 85(%) * 1e6(usecs) / 100
                         * -> 85 percent of sweep time
                         */
                        s = (devc->timebase * devc->model->num_horizontal_divs
-                            * 1e8) / 85L;
+                            * 85e6) / 100L;
                        sr_spew("Sleeping for %ld usecs instead of 
trigger-wait", s);
                        g_usleep(s);
                }
-- 
1.7.10.4


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to