]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/brymen-bm86x/protocol.c
sysclk-lwla: Do not create channels in reverse order
[libsigrok.git] / src / hardware / brymen-bm86x / protocol.c
index b8e16a3f8d346c7f983f54a235ac764f57b7b69c..4de8a74cf6bdc7ffd6e4b4124d32292544e1be00 100644 (file)
@@ -23,7 +23,7 @@
 
 #define USB_TIMEOUT 500
 
-static char char_map[128] = {
+static const char char_map[128] = {
        [0x20] = '-',
        [0x5F] = '0',
        [0x50] = '1',
@@ -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;