fix mavlink README to use correct example code
This commit is contained in:
parent
013817c24c
commit
515c4e8288
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue