From 812e44c7b6ff1e25b8cf79e8595db86bae7a98a5 Mon Sep 17 00:00:00 2001 From: Kirill Pakhomov Date: Mon, 22 Oct 2018 16:25:35 +0300 Subject: 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 --- sensorhandler.cpp | 4 +--- sensorhandler.hpp | 1 + 2 files changed, 2 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; diff --git a/sensorhandler.hpp b/sensorhandler.hpp index b32034f..5e55080 100644 --- a/sensorhandler.hpp +++ b/sensorhandler.hpp @@ -548,6 +548,7 @@ enum SensorUnitTypeCodes SENSOR_UNIT_AMPERES = 5, SENSOR_UNIT_WATTS = 6, SENSOR_UNIT_JOULES = 7, + SENSOR_UNIT_RPM = 18, SENSOR_UNIT_METERS = 34, SENSOR_UNIT_REVOLUTIONS = 41, }; -- cgit v1.2.1