Follow up on Todo, move path out of base sensor
Not every sensor needs a sysfs path, because of that
move it out of the base class and into the classes that
need it.
Change-Id: I62b7df681e1ee889eb66e371d1cd6094097e9f21
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/PSUSensor.cpp b/src/PSUSensor.cpp
index 86997d3..fdd453a 100644
--- a/src/PSUSensor.cpp
+++ b/src/PSUSensor.cpp
@@ -36,10 +36,11 @@
const std::string& sensorConfiguration,
std::string& sensorTypeName, unsigned int factor,
double max, double min) :
- Sensor(boost::replace_all_copy(sensorName, " ", "_"), path,
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"),
std::move(_thresholds), sensorConfiguration, objectType, max, min),
- objServer(objectServer), inputDev(io, open(path.c_str(), O_RDONLY)),
- waitTimer(io), errCount(0), sensorFactor(factor)
+ path(path), objServer(objectServer),
+ inputDev(io, open(path.c_str(), O_RDONLY)), waitTimer(io), errCount(0),
+ sensorFactor(factor)
{
std::string dbusPath = sensorPathPrefix + sensorTypeName + name;