Merge pull request #245 from cathalgarvey/patch-1

The take-off-before-event-handling bug again
This commit is contained in:
Ron Evans 2015-11-26 11:31:12 -08:00
commit fee0946c9e
1 changed files with 1 additions and 1 deletions

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",