From: Uwe Hermann Date: Sun, 21 May 2017 14:34:41 +0000 (+0200) Subject: ut71x: Fix float printing issue in a debug message. X-Git-Tag: libsigrok-0.5.0~59 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2b17aeb87453b956ff686c6393fa688adbc9e0b9;p=libsigrok.git ut71x: Fix float printing issue in a debug message. Old: ut71x: Applying exponent -12, new value is 0.000000. P1: 1.500 nF AUTO P1: 1.500 nF AUTO New: ut71x: Applying exponent -12, new value is 1.5e-09. P1: 1.500 nF AUTO P1: 1.500 nF AUTO This fixes bug #700. --- diff --git a/src/dmm/ut71x.c b/src/dmm/ut71x.c index 01a8c220..0f0843e0 100644 --- a/src/dmm/ut71x.c +++ b/src/dmm/ut71x.c @@ -116,7 +116,7 @@ static int parse_range(const uint8_t *buf, float *floatval, int *exponent) /* Apply respective exponent (mode-dependent) on the value. */ *floatval *= powf(10, *exponent); - sr_dbg("Applying exponent %d, new value is %f.", *exponent, *floatval); + sr_dbg("Applying exponent %d, new value is %g.", *exponent, *floatval); return SR_OK; }