File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ async def run():
11
11
print ("Waiting for drone to connect..." )
12
12
async for state in drone .core .connection_state ():
13
13
if state .is_connected :
14
- print (f "Drone discovered!" )
14
+ print ("Drone discovered!" )
15
15
break
16
16
17
17
print ("Waiting for drone to have a global position estimate..." )
@@ -32,9 +32,15 @@ async def run():
32
32
await drone .action .takeoff ()
33
33
34
34
await asyncio .sleep (1 )
35
- flying_alt = absolute_altitude + 20.0 #To fly drone 20m above the ground plane
36
- #goto_location() takes Absolute MSL altitude
37
- await drone .action .goto_location (47.399386 , 8.535245 , flying_alt , 0 )
35
+ # To fly drone 20m above the ground plane
36
+ flying_alt = absolute_altitude + 20.0
37
+ # goto_location() takes Absolute MSL altitude
38
+ await drone .action .goto_location (47.397606 , 8.543060 , flying_alt , 0 )
39
+
40
+ while True :
41
+ print ("Staying connected, press Ctrl-C to exit" )
42
+ await asyncio .sleep (1 )
43
+
38
44
39
45
if __name__ == "__main__" :
40
46
loop = asyncio .get_event_loop ()
You can’t perform that action at this time.
0 commit comments