From b1c4225289f73178b6384f8218b3a62b312ba757 Mon Sep 17 00:00:00 2001
From: Kevin Lyda <kevin@ie.suberic.net>
Date: Wed, 1 Feb 2017 22:01:12 +0000
Subject: [PATCH] Work on GetConfiguration.

---
 devices/geiger/gqgmc.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/devices/geiger/gqgmc.go b/devices/geiger/gqgmc.go
index c16f7d8..924661b 100644
--- a/devices/geiger/gqgmc.go
+++ b/devices/geiger/gqgmc.go
@@ -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)
 	}
-- 
GitLab