From: Aurelien Jacobs Date: Sun, 21 Aug 2016 14:55:50 +0000 (+0200) Subject: atten-pps3xxx: properly set encoding digits X-Git-Tag: libsigrok-0.5.0~258 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;ds=inline;h=fad810b5022734c98bcac22c2a13c095b96b781b;p=libsigrok.git atten-pps3xxx: properly set encoding digits --- diff --git a/src/hardware/atten-pps3xxx/protocol.c b/src/hardware/atten-pps3xxx/protocol.c index 0d65f869..0102adbd 100644 --- a/src/hardware/atten-pps3xxx/protocol.c +++ b/src/hardware/atten-pps3xxx/protocol.c @@ -57,6 +57,8 @@ static void handle_packet(const struct sr_dev_inst *sdi) 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 = data; for (i = 0; i < devc->model->num_channels; i++) { offset = 2 + i * 4; @@ -69,6 +71,8 @@ static void handle_packet(const struct sr_dev_inst *sdi) 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 = data; for (i = 0; i < devc->model->num_channels; i++) { offset = 4 + i * 4;