diff options
Diffstat (limited to 'software/communication/interface.go')
-rw-r--r-- | software/communication/interface.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/software/communication/interface.go b/software/communication/interface.go index d6111cc..672617e 100644 --- a/software/communication/interface.go +++ b/software/communication/interface.go @@ -2,7 +2,6 @@ package communication import ( "fmt" - "log" "go.bug.st/serial" ) @@ -32,13 +31,13 @@ func NewSerialInterface() (SerialInterface, error) { return iface, nil } -func (i *SerialInterface) Log() { +func (i *SerialInterface) Cat() error { for { data, err := i.Read() if err != nil { - log.Fatal(err) + return err } - log.Printf("RX: '%s'\n", string(data)) + fmt.Printf("%s", string(data)) } } |