lascar-el-usb: properly submit CO concentration as a PPM value

This commit is contained in:
Bert Vermeulen 2012-12-15 22:49:40 +01:00
parent b0c95747e1
commit 7f00750ca4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}