Fansensor: Add psu fan support
Also simplify parsing logic by detecting type of tach.
Change-Id: Ib08bd240313c437275ea0b604d193e720c6e9515
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/TachSensor.hpp b/include/TachSensor.hpp
index 36e3eaa..c3d3e58 100644
--- a/include/TachSensor.hpp
+++ b/include/TachSensor.hpp
@@ -50,7 +50,7 @@
sdbusplus::asio::object_server &objectServer,
std::shared_ptr<sdbusplus::asio::connection> &conn,
std::unique_ptr<PresenceSensor> &&presence,
- std::unique_ptr<RedundancySensor> &redundancy,
+ const std::shared_ptr<RedundancySensor> &redundancy,
boost::asio::io_service &io, const std::string &fanName,
std::vector<thresholds::Threshold> &&thresholds,
const std::string &sensorConfiguration);
@@ -58,7 +58,7 @@
private:
sdbusplus::asio::object_server &objServer;
- std::unique_ptr<RedundancySensor> &redundancy;
+ std::shared_ptr<RedundancySensor> redundancy;
std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
std::unique_ptr<PresenceSensor> presence;
boost::asio::posix::stream_descriptor inputDev;