Skip to content

Commit aa82880

Browse files
authored
Removed unnecessary code
Removed unnecessary sleep and disarm statements to make the code cleaner and better. No need to disarm manually as that happens automatically once the system detects landing.
1 parent b8154bc commit aa82880

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

examples/follow_me_example.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@ async def fly_drone():
3535
#Arming the drone
3636
print ("-- Arming")
3737
await drone.action.arm()
38-
await asyncio.sleep(1)
3938

4039
#Follow me Mode requires some configuration to be done before starting the mode
4140
conf = Config(default_height, follow_distance, direction, responsiveness)
4241
await drone.follow_me.set_config(conf)
43-
await asyncio.sleep(1)
4442

4543
print ("-- Taking Off")
4644
await drone.action.takeoff()
@@ -64,9 +62,6 @@ async def fly_drone():
6462

6563
print ("-- Landing")
6664
await drone.action.land()
67-
await asyncio.sleep(35)
68-
print ("-- Disarming")
69-
await drone.action.disarm()
7065

7166
if __name__ == "__main__":
7267
loop = asyncio.get_event_loop()

0 commit comments

Comments
 (0)