-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Created path_2024_task_1.py (#39)
* Created path_2024_task_1.py * fix nits * more nits * comments and newline at the bottom
Showing
1 changed file
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Task 1 path. | ||
""" | ||
|
||
import dronekit | ||
|
||
|
||
CONNECTION_ADDRESS = "tcp:localhost:14550" | ||
|
||
|
||
# Required for checks | ||
# pylint: disable-next=too-many-return-statements | ||
def run() -> int: | ||
""" | ||
Uploads mission to run a maximum number of laps and monitors the mission for early landing. | ||
""" | ||
# Wait ready is false as the drone may be on the ground | ||
drone = dronekit.connect(CONNECTION_ADDRESS, wait_ready = False) | ||
|
||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
# Not a constant | ||
# pylint: disable-next=invalid-name | ||
result_run = run() | ||
if result_run < 0: | ||
print("ERROR") | ||
|
||
print("Done") |