From: Bert Vermeulen Date: Sat, 15 Dec 2012 21:49:40 +0000 (+0100) Subject: lascar-el-usb: properly submit CO concentration as a PPM value X-Git-Tag: dsupstream~449 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7f00750ca4ed224b3880058847e6398f30cbb8f7;p=libsigrok.git lascar-el-usb: properly submit CO concentration as a PPM value --- diff --git a/hardware/lascar-el-usb/protocol.c b/hardware/lascar-el-usb/protocol.c index db46ee5e..f92611da 100644 --- a/hardware/lascar-el-usb/protocol.c +++ b/hardware/lascar-el-usb/protocol.c @@ -405,7 +405,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf, break; for (i = 0; i < samples; i++) { s = (buf[i * 2] << 8) | buf[i * 2 + 1]; - analog.data[i] = s * devc->co_high + devc->co_low; + analog.data[i] = (s * devc->co_high + devc->co_low) / 1000000; if (analog.data[i] < 0.0) analog.data[i] = 0.0; }