Skip to content

Commit 94a184c

Browse files
committed
Merge pull request #600 from dronekit/hamishwillee-fix-takeoff
Update taking_off.rst
2 parents b201c51 + 20c399f commit 94a184c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/guide/taking_off.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The code below shows a function to arm a Copter, take off, and fly to a specifie
3535
.. code-block:: python
3636
3737
# Connect to the Vehicle (in this case a simulator running the same computer)
38-
vehicle = connect('127.0.0.1:14550', wait_ready=True)
38+
vehicle = connect('tcp:127.0.0.1:5760', wait_ready=True)
3939
4040
def arm_and_takeoff(aTargetAltitude):
4141
"""
@@ -59,6 +59,7 @@ The code below shows a function to arm a Copter, take off, and fly to a specifie
5959
time.sleep(1)
6060
6161
print "Taking off!"
62+
vehicle.simple_takeoff(aTargetAltitude) # Take off to target altitude
6263
6364
# Wait until the vehicle reaches a safe height before processing the goto (otherwise the command
6465
# after Vehicle.simple_takeoff will execute immediately).
@@ -142,4 +143,4 @@ concerned about reaching a particular height, a simpler implementation might jus
142143
break
143144
time.sleep(1)
144145
145-
When the function returns the app can continue in ``GUIDED`` mode or switch to ``AUTO`` mode to start a mission.
146+
When the function returns the app can continue in ``GUIDED`` mode or switch to ``AUTO`` mode to start a mission.

0 commit comments

Comments
 (0)