finding a bug
This commit is contained in:
2
main.go
2
main.go
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user