From fad810b5022734c98bcac22c2a13c095b96b781b Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sun, 21 Aug 2016 16:55:50 +0200 Subject: [PATCH] atten-pps3xxx: properly set encoding digits --- src/hardware/atten-pps3xxx/protocol.c | 4 ++++ 1 file changed, 4 insertions(+) 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;