]> sigrok.org Git - libsigrok.git/commitdiff
brymen-bm86x: Add current loop sensor support.
authorAurelien Jacobs <redacted>
Thu, 4 Sep 2014 20:06:54 +0000 (22:06 +0200)
committerUwe Hermann <redacted>
Sat, 6 Sep 2014 15:22:03 +0000 (17:22 +0200)
src/hardware/brymen-bm86x/protocol.c

index b8e16a3f8d346c7f983f54a235ac764f57b7b69c..d300149dd516c88e0f1780d23bedd66e5cd74021 100644 (file)
@@ -161,6 +161,9 @@ static void brymen_bm86x_parse(unsigned char *buf, float *floatval,
                } else if (buf[9] & 0x04) {
                        analog[1].mq = SR_MQ_CURRENT;
                        analog[1].unit = SR_UNIT_AMPERE;
+               } else if (buf[9] & 0x08) {
+                       analog[1].mq = SR_MQ_CURRENT;
+                       analog[1].unit = SR_UNIT_PERCENTAGE;
                } else if (buf[14] & 0x04) {
                        analog[1].mq = SR_MQ_FREQUENCY;
                        analog[1].unit = SR_UNIT_HERTZ;