From: Aurelien Jacobs Date: Sun, 21 Aug 2016 14:56:14 +0000 (+0200) Subject: korad-kaxxxxp: properly set encoding digits X-Git-Tag: libsigrok-0.5.0~257 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=841c15a5fa6cf20c520e6ec7497186c845cd151b;p=libsigrok.git korad-kaxxxxp: properly set encoding digits --- diff --git a/src/hardware/korad-kaxxxxp/protocol.c b/src/hardware/korad-kaxxxxp/protocol.c index 04800257..e22ec341 100644 --- a/src/hardware/korad-kaxxxxp/protocol.c +++ b/src/hardware/korad-kaxxxxp/protocol.c @@ -359,6 +359,8 @@ SR_PRIV int korad_kaxxxxp_receive_data(int fd, int revents, void *cb_data) analog.meaning->mq = SR_MQ_CURRENT; analog.meaning->unit = SR_UNIT_AMPERE; analog.meaning->mqflags = 0; + analog.encoding->digits = 3; + analog.spec->spec_digits = 3; analog.data = &devc->current; sr_session_send(sdi, &packet); } @@ -366,6 +368,8 @@ SR_PRIV int korad_kaxxxxp_receive_data(int fd, int revents, void *cb_data) analog.meaning->mq = SR_MQ_VOLTAGE; analog.meaning->unit = SR_UNIT_VOLT; analog.meaning->mqflags = SR_MQFLAG_DC; + analog.encoding->digits = 2; + analog.spec->spec_digits = 2; analog.data = &devc->voltage; sr_session_send(sdi, &packet); sr_sw_limits_update_samples_read(&devc->limits, 1);