Skip to content

Commit 067c0cd

Browse files
authored
changed position() to home()
Changed the usage of position() with home() to make sure that drone always gets the correct home altitude as if the drone is in air position() will provide the current altitude which if used without caution can result in issues.
1 parent aa82880 commit 067c0cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/goto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ async def run():
2020
print("Global position estimate ok")
2121
break
2222

23-
print("Fetching altitude amsl at home location....")
24-
async for terrain_info in drone.telemetry.position():
23+
print("Fetching amsl altitude at home location....")
24+
async for terrain_info in drone.telemetry.home():
2525
absolute_altitude = terrain_info.absolute_altitude_m
2626
break
2727

0 commit comments

Comments
 (0)