fixed input length

This commit is contained in:
Daniel Ledda
2020-10-31 15:27:14 +01:00
parent 2ca98c934c
commit ee3440a994

View File

@@ -86,7 +86,7 @@ func readDataFromDHT(pin *gpio.Pin) ([4]byte, error) {
return receivedInput, nil return receivedInput, nil
} }
func storeCycleCountsAsBinarySequence(store *[4]byte, cycles *[80]int) error { func storeCycleCountsAsBinarySequence(store *[5]byte, cycles *[80]int) error {
for i := 0; i < 40; i++ { for i := 0; i < 40; i++ {
lowCycles := cycles[2 * i] lowCycles := cycles[2 * i]
highCycles := cycles[2 * i + 1] highCycles := cycles[2 * i + 1]