X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fcem-dt-885x%2Fprotocol.c;h=88fa8b7fbc68dfa26b8e1bbf6d67919143ac31eb;hb=6c62c605f950a42818f154f614fc00afb2106827;hp=65642775558c8c27a5fa69ba44e78e61ac5d559a;hpb=7f9932e8db3192922674e441ef2978755fd98da7;p=libsigrok.git diff --git a/src/hardware/cem-dt-885x/protocol.c b/src/hardware/cem-dt-885x/protocol.c index 65642775..88fa8b7f 100644 --- a/src/hardware/cem-dt-885x/protocol.c +++ b/src/hardware/cem-dt-885x/protocol.c @@ -134,7 +134,7 @@ static void process_mset(const struct sr_dev_inst *sdi) break; } } - sr_analog_init(&analog, &encoding, &meaning, &spec, 0); + sr_analog_init(&analog, &encoding, &meaning, &spec, 1); analog.meaning->mq = SR_MQ_SOUND_PRESSURE_LEVEL; analog.meaning->mqflags = devc->cur_mqflags; analog.meaning->unit = SR_UNIT_DECIBEL_SPL; @@ -195,7 +195,7 @@ static void send_data(const struct sr_dev_inst *sdi, unsigned char *data, fbuf[i] += ((data[i * 2 + 1] & 0xf0) >> 4); fbuf[i] += (data[i * 2 + 1] & 0x0f) / 10.0; } - sr_analog_init(&analog, &encoding, &meaning, &spec, 0); + sr_analog_init(&analog, &encoding, &meaning, &spec, 1); analog.meaning->mq = SR_MQ_SOUND_PRESSURE_LEVEL; analog.meaning->mqflags = devc->cur_mqflags; analog.meaning->unit = SR_UNIT_DECIBEL_SPL; @@ -770,11 +770,11 @@ SR_PRIV int cem_dt_885x_meas_range_set(const struct sr_dev_inst *sdi, devc = sdi->priv; if (low == 30 && high == 130) token = TOKEN_MEAS_RANGE_30_130; - else if (low == 30 && high == 80) + else if (low == 30 && high == 80) token = TOKEN_MEAS_RANGE_30_80; - else if (low == 50 && high == 100) + else if (low == 50 && high == 100) token = TOKEN_MEAS_RANGE_50_100; - else if (low == 80 && high == 130) + else if (low == 80 && high == 130) token = TOKEN_MEAS_RANGE_80_130; else return SR_ERR;