Fix units for fan RPM sensor
Use actual RPM unit type code from IPMI specification
instead of revolutions type code coupled with per minute bit,
which is also unused in most ipmi client implementations.
Change-Id: If42900950a21f5526e890aef0dd6822e4e54c6e3
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 1058230..21677ea 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -625,9 +625,7 @@
body->sensor_units_2_base = get_sdr::SENSOR_UNIT_DEGREES_C;
break;
case server::Value::Unit::RPMS:
- body->sensor_units_2_base =
- get_sdr::SENSOR_UNIT_REVOLUTIONS; // revolutions
- get_sdr::body::set_rate_unit(0b100, body); // per minute
+ body->sensor_units_2_base = get_sdr::SENSOR_UNIT_RPM;
break;
case server::Value::Unit::Volts:
body->sensor_units_2_base = get_sdr::SENSOR_UNIT_VOLTS;
diff --git a/sensorhandler.hpp b/sensorhandler.hpp
index b32034f..5e55080 100644
--- a/sensorhandler.hpp
+++ b/sensorhandler.hpp
@@ -548,6 +548,7 @@
SENSOR_UNIT_AMPERES = 5,
SENSOR_UNIT_WATTS = 6,
SENSOR_UNIT_JOULES = 7,
+ SENSOR_UNIT_RPM = 18,
SENSOR_UNIT_METERS = 34,
SENSOR_UNIT_REVOLUTIONS = 41,
};