]> sigrok.org Git - libsigrok.git/commitdiff
fluke-dmm: Do not consider 0.0 value an invalid measurement.
authorMathieu Pilato <redacted>
Fri, 10 Mar 2023 08:10:11 +0000 (09:10 +0100)
committerGerhard Sittig <redacted>
Sun, 19 Mar 2023 10:42:03 +0000 (11:42 +0100)
(Issue seems an oversight from commit 357e341)

src/hardware/fluke-dmm/protocol.c

index fc2f11dde0af368b9b3b48c4ccb135c4f1e0de52..77200c3ed163be8e9f4f00358963190e4bdb9a3d 100644 (file)
@@ -56,7 +56,7 @@ static void handle_qm_18x(const struct sr_dev_inst *sdi, char **tokens)
                while (*e && *e != ' ')
                        e++;
                *e++ = '\0';
-               if (sr_atof_ascii(tokens[1], &fvalue) != SR_OK || fvalue == 0.0) {
+               if (sr_atof_ascii(tokens[1], &fvalue) != SR_OK) {
                        /* Happens all the time, when switching modes. */
                        sr_dbg("Invalid float.");
                        return;
@@ -173,7 +173,7 @@ static void handle_qm_28x(const struct sr_dev_inst *sdi, char **tokens)
        if (!tokens[1])
                return;
 
-       if (sr_atof_ascii(tokens[0], &fvalue) != SR_OK || fvalue == 0.0) {
+       if (sr_atof_ascii(tokens[0], &fvalue) != SR_OK) {
                sr_err("Invalid float '%s'.", tokens[0]);
                return;
        }