]> sigrok.org Git - libsigrok.git/commitdiff
analog: support ppm output
authorBert Vermeulen <redacted>
Sat, 15 Dec 2012 21:50:33 +0000 (22:50 +0100)
committerBert Vermeulen <redacted>
Sat, 15 Dec 2012 21:50:33 +0000 (22:50 +0100)
output/analog.c

index 776f29549074dcbae0a23188ef53ce92b40b28c7..448b112efce12578c508980412a83d16c1b433b1 100644 (file)
@@ -173,6 +173,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out)
                                 * a made-up notation. */
                                g_string_append(out, " %oA");
                        break;
+               case SR_UNIT_CONCENTRATION:
+                       g_string_append_printf(out, "%f ppm", value * 1000000);
+                       break;
                default:
                        si_printf(value, out, "");
        }