diff options
Diffstat (limited to 'presence/tach_sensor.hpp')
-rw-r--r-- | presence/tach_sensor.hpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/presence/tach_sensor.hpp b/presence/tach_sensor.hpp index 3de5d69..47d2098 100644 --- a/presence/tach_sensor.hpp +++ b/presence/tach_sensor.hpp @@ -1,7 +1,7 @@ #pragma once -#include <sdbusplus/bus.hpp> #include <sdbusplus/server.hpp> +#include "sdbusplus.hpp" #include "sensor_base.hpp" @@ -33,17 +33,14 @@ class TachSensor : public Sensor /** * @brief Constructs Tach Sensor Object * - * @param[in] bus - Dbus bus object * @param[in] id - ID name of this sensor * @param[in] fanEnc - Reference to the fan enclosure with this sensor */ TachSensor( - sdbusplus::bus::bus& bus, const std::string& id, FanEnclosure& fanEnc) : Sensor(id, fanEnc), - bus(bus), - tachSignal(bus, + tachSignal(util::SDBusPlus::getBus(), match(id).c_str(), std::bind( std::mem_fn(&TachSensor::handleTachChange), @@ -61,8 +58,6 @@ class TachSensor : public Sensor bool isPresent(); private: - /** @brief Connection for sdbusplus bus */ - sdbusplus::bus::bus& bus; /** @brief Used to subscribe to dbus signals */ sdbusplus::server::match::match tachSignal; /** @brief Tach speed value given from the signal */ |