diff options
Diffstat (limited to 'presence/tach_sensor.hpp')
-rw-r--r-- | presence/tach_sensor.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/presence/tach_sensor.hpp b/presence/tach_sensor.hpp index 47d2098..068a66f 100644 --- a/presence/tach_sensor.hpp +++ b/presence/tach_sensor.hpp @@ -38,14 +38,16 @@ class TachSensor : public Sensor */ TachSensor( const std::string& id, - FanEnclosure& fanEnc) : + FanEnclosure& fanEnc, + bool initialState = false) : Sensor(id, fanEnc), tachSignal(util::SDBusPlus::getBus(), match(id).c_str(), std::bind( std::mem_fn(&TachSensor::handleTachChange), this, - std::placeholders::_1)) + std::placeholders::_1)), + state(initialState) { // Nothing to do here } @@ -61,7 +63,7 @@ class TachSensor : public Sensor /** @brief Used to subscribe to dbus signals */ sdbusplus::server::match::match tachSignal; /** @brief Tach speed value given from the signal */ - int64_t tach = 0; + bool state; /** * @brief Appends the fan sensor id to construct a match string |