Skip to content
Snippets Groups Projects
Commit 7a6589b4 authored by Kevin Lyda's avatar Kevin Lyda :speech_balloon:
Browse files

Got serial working.

parent b191819f
No related branches found
No related tags found
Loading
Pipeline #
......@@ -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)
}
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment