Skip to content

Commit 6e251b2

Browse files
committed
Set takeoff altitude with an action
1 parent 2b295e7 commit 6e251b2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/telemetry_takeoff_and_land.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,12 @@ async def run():
4646
print("-- Global position state is good enough for flying.")
4747
break
4848

49-
# Take the drone little bit higher during takeoff
50-
print("-- Setting takeoff altitude")
51-
await drone.param.set_param_float('MIS_TAKEOFF_ALT', 10.0)
52-
5349
# Execute the maneuvers
5450
print("-- Arming")
5551
await drone.action.arm()
5652

5753
print("-- Taking off")
54+
await drone.action.set_takeoff_altitude(10.0)
5855
await drone.action.takeoff()
5956

6057
await asyncio.sleep(10)

0 commit comments

Comments
 (0)