Skip to content

Commit

Permalink
firmata: switch to using go-serial package
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Jun 15, 2017
1 parent c057909 commit ca6f757
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ deps:
github.com/mgutz/logxi/v1 \
github.com/nats-io/nats \
github.com/sigurn/crc8 \
github.com/tarm/serial \
go.bug.st/serial.v1 \
github.com/veandco/go-sdl2/sdl \
golang.org/x/net/websocket \
golang.org/x/sys/unix
4 changes: 2 additions & 2 deletions platforms/firmata/firmata_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"time"

"github.com/tarm/serial"
serial "go.bug.st/serial.v1"
"gobot.io/x/gobot"
"gobot.io/x/gobot/drivers/i2c"
"gobot.io/x/gobot/platforms/firmata/client"
Expand Down Expand Up @@ -54,7 +54,7 @@ func NewAdaptor(args ...interface{}) *Adaptor {
conn: nil,
board: client.New(),
PortOpener: func(port string) (io.ReadWriteCloser, error) {
return serial.OpenPort(&serial.Config{Name: port, Baud: 57600})
return serial.Open(port, &serial.Mode{BaudRate: 57600})
},
Eventer: gobot.NewEventer(),
}
Expand Down

0 comments on commit ca6f757

Please sign in to comment.