diff options
Diffstat (limited to 'monitor/tach_sensor.hpp')
-rw-r--r-- | monitor/tach_sensor.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/monitor/tach_sensor.hpp b/monitor/tach_sensor.hpp index dd89bbf..50951cd 100644 --- a/monitor/tach_sensor.hpp +++ b/monitor/tach_sensor.hpp @@ -62,6 +62,8 @@ class TachSensor * @param[in] id - the id of the sensor * @param[in] hasTarget - if the sensor supports * setting the speed + * @param[in] factor - the factor of the sensor target + * @param[in] offset - the offset of the sensor target * @param[in] timeout - Normal timeout value to use * @param[in] events - sd_event pointer */ @@ -70,6 +72,8 @@ class TachSensor Fan& fan, const std::string& id, bool hasTarget, + size_t factor, + size_t offset, size_t timeout, phosphor::fan::event::EventPtr& events); @@ -95,6 +99,22 @@ class TachSensor } /** + * @brief Returns the factor of the sensor target + */ + inline size_t getFactor() const + { + return _factor; + } + + /** + * @brief Returns the offset of the sensor target + */ + inline size_t getOffset() const + { + return _offset; + } + + /** * Returns true if the hardware behind this * sensor is considered working OK/functional. */ @@ -217,6 +237,16 @@ class TachSensor const bool _hasTarget; /** + * @brief The factor of target to get fan rpm + */ + const size_t _factor; + + /** + * @brief The offset of target to get fan rpm + */ + const size_t _offset; + + /** * @brief The input speed, from the Value dbus property */ int64_t _tachInput = 0; |