File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ def main():
16
16
17
17
args = parser .parse_args ()
18
18
19
- asyncio .run (set_params ())
19
+ asyncio .run (set_params (args ))
20
20
21
21
22
- async def set_params ():
22
+ async def set_params (args ):
23
23
drone = System ()
24
24
await drone .connect (system_address = args .connection )
25
25
print ("Connected to the Vehicle" )
@@ -32,12 +32,11 @@ async def set_params():
32
32
float_param_names = [p .name for p in float_params ]
33
33
custom_param_names = [p .name for p in custom_params ]
34
34
35
- while True :
36
- async for is_in_air in drone .telemetry .in_air ():
37
- if is_in_air :
38
- print ("Waiting until vehicle is landed..." )
39
- else :
40
- break
35
+ async for is_in_air in drone .telemetry .in_air ():
36
+ if is_in_air :
37
+ print ("Waiting until vehicle is landed..." )
38
+ else :
39
+ break
41
40
42
41
with open (args .param_file , "r" ) as param_file :
43
42
print ("Uploading Parameters... Please do not arm the vehicle!" )
@@ -62,4 +61,4 @@ async def set_params():
62
61
63
62
64
63
if __name__ == "__main__" :
65
- main ()
64
+ main ()
You can’t perform that action at this time.
0 commit comments