]> sigrok.org Git - libsigrok.git/commitdiff
output/analog: add revolutions per minute unit
authorAurelien Jacobs <redacted>
Thu, 3 Oct 2013 19:37:14 +0000 (21:37 +0200)
committerUwe Hermann <redacted>
Sun, 6 Oct 2013 22:36:18 +0000 (00:36 +0200)
libsigrok.h
output/analog.c

index a22b6d18d6a0f37eb1817c5082bf1d942e8caa9c..67f3197159bcd12129bdfc1903a4887bb9c0a7be 100644 (file)
@@ -216,6 +216,7 @@ enum {
         * represented as the fraction of number of particles of the substance.
         */
        SR_UNIT_CONCENTRATION,
+       SR_UNIT_REVOLUTIONS_PER_MINUTE,
 };
 
 /** Values for sr_datafeed_analog.flags. */
index 85def20948abb808f6038246273c45cfca5d07bd..7437663924f86d1688fc190f134fe2fa9aee7e80 100644 (file)
@@ -173,6 +173,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out)
        case SR_UNIT_CONCENTRATION:
                g_string_append_printf(out, "%f ppm", value * 1000000);
                break;
+       case SR_UNIT_REVOLUTIONS_PER_MINUTE:
+               si_printf(value, out, "RPM");
+               break;
        default:
                si_printf(value, out, "");
                break;