Move dbus connection into base sensor object
This seems common through most sensors, might as
well move it for consistency.
Tested: sensors operational as normal
Change-Id: I4e6c55cbb7171ee51700015f8c2ef8c05c90fb4e
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index 7197c4a..41d9a19 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -166,9 +166,9 @@
Sensor(boost::replace_all_copy(sensorName, " ", "_"),
std::move(thresholdData), sensorConfiguration,
"xyz.openbmc_project.Configuration.ExitAirTemp", cfmMaxReading,
- cfmMinReading, PowerState::on),
+ cfmMinReading, conn, PowerState::on),
std::enable_shared_from_this<CFMSensor>(), parent(parent),
- dbusConnection(conn), objServer(objectServer)
+ objServer(objectServer)
{
sensorInterface =
objectServer.add_interface("/xyz/openbmc_project/sensors/cfm/" + name,
@@ -494,9 +494,8 @@
Sensor(boost::replace_all_copy(sensorName, " ", "_"),
std::move(thresholdData), sensorConfiguration,
"xyz.openbmc_project.Configuration.ExitAirTemp", exitAirMaxReading,
- exitAirMinReading, PowerState::on),
- std::enable_shared_from_this<ExitAirTempSensor>(), dbusConnection(conn),
- objServer(objectServer)
+ exitAirMinReading, conn, PowerState::on),
+ std::enable_shared_from_this<ExitAirTempSensor>(), objServer(objectServer)
{
sensorInterface = objectServer.add_interface(
"/xyz/openbmc_project/sensors/temperature/" + name,