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/sysfs/sysfswrite.cpp b/sysfs/sysfswrite.cpp
index 1ea4c4d..6ca9b25 100644
--- a/sysfs/sysfswrite.cpp
+++ b/sysfs/sysfswrite.cpp
@@ -21,12 +21,12 @@
void SysFsWritePercent::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;
std::ofstream ofs;
ofs.open(_writepath);