1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-13 19:29:10 +08:00

The take-off-before-event-handling bug again

This commit is contained in:
Cathal Garvey 2015-11-07 15:59:44 -08:00
parent 274cb02647
commit 78bf872281

View File

@ -26,12 +26,12 @@ func main() {
drone := ardrone.NewArdroneDriver(ardroneAdaptor, "Drone")
work := func() {
drone.TakeOff()
gobot.On(drone.Event("flying"), func(data interface{}) {
gobot.After(3*time.Second, func() {
drone.Land()
})
})
drone.TakeOff()
}
robot := gobot.NewRobot("drone",