Commit b1c42252 authored by Kevin Lyda's avatar Kevin Lyda 💬

Work on GetConfiguration.

parent ae38ed03
Pipeline #1234 passed with stage
in 1 minute and 10 seconds
......@@ -452,7 +452,7 @@ func (gc *GQGMCCounter) recv(length int) ([]byte, error) {
}
if n != length {
for i := 0; i < 20; i++ {
fmt.Printf("%d ", n)
fmt.Printf("%d(%d) ", n, len(buf))
n, err = gc.port.Read(buf[len(buf):])
if err != nil {
return nil, err
......@@ -461,9 +461,9 @@ func (gc *GQGMCCounter) recv(length int) ([]byte, error) {
break
}
}
fmt.Printf("%d\n", n)
fmt.Printf("%d(%d)\n", n, len(buf))
}
if n != length {
if len(buf) != length {
fmt.Printf("Short read: %+v\n", buf)
return nil, fmt.Errorf("Short read (got: %d, wanted: %d)", n, length)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment