finding a bug
This commit is contained in:
2
main.go
2
main.go
@@ -104,8 +104,8 @@ func storeCycleCountsAsBinarySequence(cycles *[80]int) ([5]byte, 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]
|
||||||
if (lowCycles == Timeout) || (highCycles == Timeout) {
|
|
||||||
fmt.Println(lowCycles, highCycles)
|
fmt.Println(lowCycles, highCycles)
|
||||||
|
if (lowCycles == Timeout) || (highCycles == Timeout) {
|
||||||
//return [5]byte{}, errors.New("timed out waiting for sensor pulse")
|
//return [5]byte{}, errors.New("timed out waiting for sensor pulse")
|
||||||
}
|
}
|
||||||
data[i / 8] <<= 1
|
data[i / 8] <<= 1
|
||||||
|
|||||||
Reference in New Issue
Block a user