Move all floats to doubles
The code was developed initially around a pid loop implemented using
floats. Therefore, the code was converting back and forth between
double for sensor values as inputs and outputs from this PID loop.
Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/dbus/dbuswrite.cpp b/dbus/dbuswrite.cpp
index fab9b4a..dff11d6 100644
--- a/dbus/dbuswrite.cpp
+++ b/dbus/dbuswrite.cpp
@@ -61,12 +61,12 @@
void DbusWritePercent::write(double value)
{
- float minimum = getMin();
- float maximum = getMax();
+ double minimum = getMin();
+ double maximum = getMax();
- float range = maximum - minimum;
- float offset = range * value;
- float ovalue = offset + minimum;
+ double range = maximum - minimum;
+ double offset = range * value;
+ double ovalue = offset + minimum;
if (oldValue == static_cast<int64_t>(ovalue))
{