]> sigrok.org Git - libsigrok.git/commitdiff
add MQ/units for carbon monoxide concentration
authorBert Vermeulen <redacted>
Sat, 15 Dec 2012 09:50:22 +0000 (10:50 +0100)
committerBert Vermeulen <redacted>
Sat, 15 Dec 2012 09:50:22 +0000 (10:50 +0100)
hardware/lascar-el-usb/protocol.c
libsigrok.h

index 508727adbab795938cdf0be3d2b8be3a0a921a74..defbb5dfdf095fcb6f54dfc8a8cd96586825f447 100644 (file)
@@ -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;
index d68ec1439bcc588cafcde55d0fc411e04750d39a..a1a50e422d043f7e1c2c0ae34647fb157a550318 100644 (file)
@@ -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. */