add MQ/units for carbon monoxide concentration
This commit is contained in:
parent
6aa1eb4ea3
commit
4f3bd685e6
|
@ -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;
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue