finding a bug

This commit is contained in:
Daniel Ledda
2020-10-31 16:18:21 +01:00
parent ed52d43e48
commit 0bb957fe2d

View File

@@ -114,7 +114,7 @@ func storeCycleCountsAsBinarySequence(cycles *[80]int) ([5]byte, error) {
func convertToRhAndTemp(data [5]byte) (float32, float32) {
rh := float32(int(data[0]) << 8) + float32(data[1])
temp := float32(int(data[0]) << 8) + float32(data[3])
temp := float32(int(data[2]) << 8) + float32(data[3])
return rh/10, temp/10
}