Skip to content

Commit 91f77b3

Browse files
authored
Merge pull request #4 from stevenbell/patch-1
Cast to int32 so that negative values work
2 parents eb14d3e + c68683f commit 91f77b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MKRTHERM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ float THERMClass::readTemperature()
9494
rawword >>= 18;
9595
}
9696
// multiply for the LSB value
97-
celsius = rawword * 0.25f;
97+
celsius = (int32_t)rawword * 0.25f;
9898

9999
return celsius;
100100
}

0 commit comments

Comments
 (0)