]> sigrok.org Git - libsigrok.git/commitdiff
atten-pps3xxx: properly set encoding digits
authorAurelien Jacobs <redacted>
Sun, 21 Aug 2016 14:55:50 +0000 (16:55 +0200)
committerUwe Hermann <redacted>
Tue, 23 Aug 2016 10:58:05 +0000 (12:58 +0200)
src/hardware/atten-pps3xxx/protocol.c

index 0d65f8696138f577570f3ed893c863ef58f311da..0102adbd9a33b731cd021f7b6d7e632b3067be01 100644 (file)
@@ -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;