diff --git a/hardware/lascar-el-usb/protocol.c b/hardware/lascar-el-usb/protocol.c index 508727ad..defbb5df 100644 --- a/hardware/lascar-el-usb/protocol.c +++ b/hardware/lascar-el-usb/protocol.c @@ -313,8 +313,8 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf, packet.type = SR_DF_ANALOG; packet.payload = &analog; analog.num_samples = samples; - analog.mq = 0; - analog.unit = 0; + analog.mq = SR_MQ_CARBON_MONOXIDE; + analog.unit = SR_UNIT_CONCENTRATION; analog.mqflags = 0; if (!(analog.data = g_try_malloc(sizeof(float) * samples))) break; diff --git a/libsigrok.h b/libsigrok.h index d68ec143..a1a50e42 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -176,6 +176,7 @@ enum { /** Logarithmic representation of sound pressure relative to a * reference value. */ SR_MQ_SOUND_PRESSURE_LEVEL, + SR_MQ_CARBON_MONOXIDE, }; /** Values for sr_datafeed_analog.unit. */ @@ -208,6 +209,7 @@ enum { SR_UNIT_UNITLESS, /** Sound pressure level relative so 20 micropascals. */ SR_UNIT_DECIBEL_SPL, + SR_UNIT_CONCENTRATION, }; /** Values for sr_datafeed_analog.flags. */