-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update examples to use new Drone class
- Loading branch information
1 parent
7743709
commit 42408d6
Showing
14 changed files
with
410 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import asyncio | ||
|
||
from mavsdk import start_mavlink | ||
from mavsdk import connect as mavsdk_connect | ||
|
||
start_mavlink(connection_url="udp://:14540") | ||
drone = mavsdk_connect(host="127.0.0.1") | ||
from mavsdk import Drone | ||
|
||
|
||
async def run(): | ||
drone = Drone() | ||
await drone.connect(drone_address="udp://:14540") | ||
|
||
info = await drone.info.get_version() | ||
print(info) | ||
|
||
|
||
loop = asyncio.get_event_loop() | ||
loop.run_until_complete(run()) | ||
if __name__ == "__main__": | ||
loop = asyncio.get_event_loop() | ||
loop.run_until_complete(run()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.