Merge pull request #245 from cathalgarvey/patch-1
The take-off-before-event-handling bug again
This commit is contained in:
commit
fee0946c9e
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue