From: Mathieu Pilato Date: Fri, 10 Mar 2023 08:10:11 +0000 (+0100) Subject: fluke-dmm: Do not consider 0.0 value an invalid measurement. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ad42cfebcbda16a4021c7e1532ccfc15074bc870;p=libsigrok.git fluke-dmm: Do not consider 0.0 value an invalid measurement. (Issue seems an oversight from commit 357e341) --- diff --git a/src/hardware/fluke-dmm/protocol.c b/src/hardware/fluke-dmm/protocol.c index fc2f11dd..77200c3e 100644 --- a/src/hardware/fluke-dmm/protocol.c +++ b/src/hardware/fluke-dmm/protocol.c @@ -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; }