You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
342 B
Python
12 lines
342 B
Python
|
2 years ago
|
import asyncio
|
||
|
|
from mavsdk import System
|
||
|
|
async def Connect():
|
||
|
|
|
||
|
|
drone = System(port=50053) #需要與Mavsdk_server的port相同
|
||
|
|
await drone.connect("udp://:14550") #需要與Mavsdk_server的udp port相同
|
||
|
|
print("Connected")
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
loop = asyncio.get_event_loop()
|
||
|
|
loop.run_until_complete(Connect())
|