Add negation to logic
As the value of the PowerInputWatts and PowerOutputWatts
are getting exchanged,so I added negation in the logic.This
will correct the values.
Tested:
I have tested it and now the values are coming correct.
Change-Id: I67bf6c5050ceb05c13419b370105d80f913b0c17
Signed-off-by: Anjaliintel-21 <anjali.ray@intel.com>
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 5bd846d..2f94d3a 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -832,7 +832,7 @@
sensorJson["Name"] = "Chassis Power Control";
unit = "/PowerConsumedWatts"_json_pointer;
}
- else if (boost::ifind_first(sensorName, "input").empty())
+ else if (!(boost::ifind_first(sensorName, "input").empty()))
{
unit = "/PowerInputWatts"_json_pointer;
}