diff --git a/cmd/gqgmc/main.go b/cmd/gqgmc/main.go
index 46cb804c7fa84cd1175fb3740c1dc15b5fb4e59d..120606da69697929d010bfdcc65ebe79fbcf22e5 100644
--- a/cmd/gqgmc/main.go
+++ b/cmd/gqgmc/main.go
@@ -57,13 +57,13 @@ func main() {
fmt.Printf("Failed to connect to geiger counter: '%s'\n", err)
return
}
- fmt.Printf("Version: %s\n", ser)
+ fmt.Printf("Serial: %s\n", ser)
volts, err = gc.Volts()
if err != nil {
fmt.Printf("Failed to connect to geiger counter: '%s'\n", err)
return
}
- fmt.Printf("Version: %d\n", volts)
+ fmt.Printf("Volts: %d\n", volts)
}
diff --git a/devices/geiger/gqgmc.go b/devices/geiger/gqgmc.go
index e028a77d1ec3c44c29843922e6dbc4faaa243b90..7bd8db4b7ab450fd2bd426774df29b451c5efc2d 100644
--- a/devices/geiger/gqgmc.go
+++ b/devices/geiger/gqgmc.go
@@ -155,7 +155,7 @@ func (gc *GQGMCCounter) SerialNum() (string, error) {
serStr := ""
ser, err := gc.communicate(cmdGetSerial, 7)
- if err != nil {
+ if err == nil {
for _, b := range ser {
serStr += fmt.Sprintf("%02X", b)
}