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

index 80b799d9e9dd1c08cf0590fa055af97729b957b6..beb2bcdef3b2ea60c5c1aa22758282275dfff8fd 100644 (file)
@@ -51,6 +51,8 @@ static void send_data(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 = 3;
+       analog.spec->spec_digits = 2;
        analog.data = data;
 
        for (i = 0; i < devc->model->num_channels; i++)
@@ -60,6 +62,8 @@ static void send_data(struct sr_dev_inst *sdi)
        analog.meaning->mq = SR_MQ_CURRENT;
        analog.meaning->unit = SR_UNIT_AMPERE;
        analog.meaning->mqflags = 0;
+       analog.encoding->digits = 4;
+       analog.spec->spec_digits = 3;
        analog.data = data;
        for (i = 0; i < devc->model->num_channels; i++)
                ((float *)analog.data)[i] = devc->channel_status[i].output_current_last; /* Value always 0 for channel 3, if present! */