made all doubles to floats

This commit is contained in:
proddy
2019-11-04 19:16:07 +01:00
parent 17dc48b376
commit 9f146768b4
5 changed files with 49 additions and 49 deletions

View File

@@ -182,10 +182,10 @@ int16_t DS18::getRawValue(unsigned char index) {
return raw;
}
// return real value as a double
// return real value as a float
// The raw temperature data is in units of sixteenths of a degree, so the value must be divided by 16 in order to convert it to degrees.
double DS18::getValue(unsigned char index) {
double value = (float)getRawValue(index) / 16.0;
float DS18::getValue(unsigned char index) {
float value = (float)getRawValue(index) / 16.0;
return value;
}