From: Aurelien Jacobs Date: Thu, 3 Oct 2013 19:37:14 +0000 (+0200) Subject: output/analog: add revolutions per minute unit X-Git-Tag: libsigrok-0.2.2~48 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=87532f23a4dbfb6ae1454cbea4566725d5a7555c;p=libsigrok.git output/analog: add revolutions per minute unit --- diff --git a/libsigrok.h b/libsigrok.h index a22b6d18..67f31971 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -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. */ diff --git a/output/analog.c b/output/analog.c index 85def209..74376639 100644 --- a/output/analog.c +++ b/output/analog.c @@ -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;