fix mavlink README to use correct example code

This commit is contained in:
Joe Kim 2019-01-14 21:19:52 -05:00 committed by Ron Evans
parent 013817c24c
commit 515c4e8288
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func main() {
iris := mavlink.NewDriver(adaptor)
work := func() {
gobot.Once(iris.Event("packet"), func(data interface{}) {
iris.Once(iris.Event("packet"), func(data interface{}) {
packet := data.(*common.MAVLinkPacket)
dataStream := common.NewRequestDataStream(100,
@ -54,7 +54,7 @@ func main() {
))
})
gobot.On(iris.Event("message"), func(data interface{}) {
iris.On(iris.Event("message"), func(data interface{}) {
if data.(common.MAVLinkMessage).Id() == 30 {
message := data.(*common.Attitude)
fmt.Println("Attitude")