From: Aurelien Jacobs Date: Sun, 21 Aug 2016 14:57:28 +0000 (+0200) Subject: motech-lps-30x: properly set encoding digits X-Git-Tag: libsigrok-0.5.0~255 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bcaadb366f56127b1a39ce54b0de03c975701c4c;p=libsigrok.git motech-lps-30x: properly set encoding digits --- diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index 80b799d9..beb2bcde 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -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! */