dbuspassive: allow scaling

For tachs it is beneficial to deal in percent so that
multiple controllers can be used with different fan
types without having to recalculate. This starts using
the unused min and max fields to be able to scale readings.
Since max and min are commonly on the value interface, the
special value of <int64_t>::lowest() allows these to be gathered
from dbus instead of having to enter them manually.

Tested-by: Moved pid control to percent and printed
outputs

Change-Id: I9496eb92a18b68a7cd7f034d41d40ef5175c6974
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/dbus/util.hpp b/dbus/util.hpp
index 719bb1d..69a8112 100644
--- a/dbus/util.hpp
+++ b/dbus/util.hpp
@@ -7,6 +7,8 @@
 {
     int64_t scale;
     double value;
+    double min;
+    double max;
     std::string unit;
 };
 
@@ -83,6 +85,7 @@
 
 std::string getSensorPath(const std::string& type, const std::string& id);
 std::string getMatch(const std::string& type, const std::string& id);
+void scaleSensorReading(const double min, const double max, double& value);
 bool validType(const std::string& type);
 
 struct VariantToDoubleVisitor