summaryrefslogtreecommitdiffstats
path: root/sensorhandler.cpp
diff options
context:
space:
mode:
authorKirill Pakhomov <k.pakhomov@yadro.com>2018-10-22 16:25:35 +0300
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-12-12 16:08:31 +0000
commit812e44c7b6ff1e25b8cf79e8595db86bae7a98a5 (patch)
tree1ed7c700d5e1232fbe3bbe108e173a28c985f07f /sensorhandler.cpp
parent4026e446d67cc1e1b08cdc43b5208416cfca8af0 (diff)
downloadphosphor-host-ipmid-812e44c7b6ff1e25b8cf79e8595db86bae7a98a5.tar.gz
phosphor-host-ipmid-812e44c7b6ff1e25b8cf79e8595db86bae7a98a5.zip
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>
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r--sensorhandler.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 1058230..21677ea 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -625,9 +625,7 @@ void setUnitFieldsForObject(const ipmi::sensor::Info* info,
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;
OpenPOWER on IntegriCloud