1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00
deadprogram f1239d42a0 Change default value for PCMD flag to match the Bebop 2.0.57+ expectations
Signed-off-by: deadprogram <ron@hybridgroup.com>
2016-04-12 14:27:30 -07:00

36 lines
531 B
Go

package main
import (
"fmt"
"time"
"github.com/hybridgroup/gobot/platforms/bebop/client"
)
func main() {
bebop := client.New()
if err := bebop.Connect(); err != nil {
fmt.Println(err)
return
}
bebop.HullProtection(true)
fmt.Println("takeoff")
if err := bebop.TakeOff(); err != nil {
fmt.Println(err)
fmt.Println("fail")
return
}
<-time.After(5 * time.Second)
fmt.Println("land")
if err := bebop.Land(); err != nil {
fmt.Println(err)
return
}
<-time.After(5 * time.Second)
fmt.Println("done")
}