]> sigrok.org Git - libsigrok.git/commit - src/hardware/rigol-ds/api.c
rigol-ds: fix search for the closest vdiv.
authorAurelien Jacobs <redacted>
Sat, 14 Feb 2015 22:48:36 +0000 (23:48 +0100)
committerUwe Hermann <redacted>
Sun, 15 Feb 2015 20:15:04 +0000 (21:15 +0100)
commitc33ff3771bcbab940ee7da88c89e70b61c26d0d3
tree9076a6d3919c1579e240f2ae95a8b293e297c11b
parentf44f7e61a37f0b42dc06e85278b0b152ddc70ab2
rigol-ds: fix search for the closest vdiv.

We try to find the smallest diff by comparing each diff with
the previously known smallest diff, so initially, this smallest diff
should be INFINITY so that we are sure to find a smaller one.

This fixes the following exception:
sr: rigol-ds: Negative vdiv index: -1.
Caught exception: not applicable
src/hardware/rigol-ds/api.c