We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f205b21 + cf6fac7 commit 253b1c8Copy full SHA for 253b1c8
examples/gimbal.py
@@ -10,7 +10,7 @@ async def run():
10
await drone.connect(system_address="udp://:14540")
11
12
# Start printing gimbal position updates
13
- asyncio.ensure_future(print_gimbal_position(drone))
+ print_gimbal_position_task = asyncio.ensure_future(print_gimbal_position(drone))
14
15
print("Taking control of gimbal")
16
await drone.gimbal.take_control(ControlMode.PRIMARY)
@@ -71,6 +71,8 @@ async def run():
71
print("Release control of gimbal again")
72
await drone.gimbal.release_control()
73
74
+ print_gimbal_position_task.cancel()
75
+
76
77
async def print_gimbal_position(drone):
78
# Report gimbal position updates asynchronously
0 commit comments