From af1e487e3f8268bd3cecf778a26fa391ea2d1a31 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Thu, 4 Sep 2014 22:06:54 +0200 Subject: [PATCH] brymen-bm86x: Add current loop sensor support. --- src/hardware/brymen-bm86x/protocol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hardware/brymen-bm86x/protocol.c b/src/hardware/brymen-bm86x/protocol.c index b8e16a3f..d300149d 100644 --- a/src/hardware/brymen-bm86x/protocol.c +++ b/src/hardware/brymen-bm86x/protocol.c @@ -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;