firmata: switch to using go-serial package

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-05-13 11:13:33 +02:00
parent c057909011
commit ca6f7573ac
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ deps:
github.com/mgutz/logxi/v1 \ github.com/mgutz/logxi/v1 \
github.com/nats-io/nats \ github.com/nats-io/nats \
github.com/sigurn/crc8 \ github.com/sigurn/crc8 \
github.com/tarm/serial \ go.bug.st/serial.v1 \
github.com/veandco/go-sdl2/sdl \ github.com/veandco/go-sdl2/sdl \
golang.org/x/net/websocket \ golang.org/x/net/websocket \
golang.org/x/sys/unix golang.org/x/sys/unix

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/tarm/serial" serial "go.bug.st/serial.v1"
"gobot.io/x/gobot" "gobot.io/x/gobot"
"gobot.io/x/gobot/drivers/i2c" "gobot.io/x/gobot/drivers/i2c"
"gobot.io/x/gobot/platforms/firmata/client" "gobot.io/x/gobot/platforms/firmata/client"
@ -54,7 +54,7 @@ func NewAdaptor(args ...interface{}) *Adaptor {
conn: nil, conn: nil,
board: client.New(), board: client.New(),
PortOpener: func(port string) (io.ReadWriteCloser, error) { 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(), Eventer: gobot.NewEventer(),
} }