output/analog: add revolutions per minute unit

This commit is contained in:
Aurelien Jacobs 2013-10-03 21:37:14 +02:00 committed by Uwe Hermann
parent 2f9376117c
commit 87532f23a4
2 changed files with 4 additions and 0 deletions

View 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. */

View 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;