Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added timeout variable to path_2024.py #45

Merged
merged 2 commits into from
Mar 17, 2024
Merged

Conversation

mgupta27
Copy link
Collaborator

Added timeout variable to path_2024.py

@mgupta27 mgupta27 requested a review from Trotyl15 March 15, 2024 01:56
@mgupta27 mgupta27 self-assigned this Mar 15, 2024
Copy link
Member

@Trotyl15 Trotyl15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

path_2024.py Outdated
@@ -32,7 +33,7 @@ def run() -> int:
Reads in hardcoded waypoints from CSV file and sends drone commands.
"""
# Wait ready is false as the drone may be on the ground
drone = dronekit.connect(CONNECTION_ADDRESS, wait_ready = False)
drone = dronekit.connect(CONNECTION_ADDRESS, wait_ready = False, timeout = TIMEOUT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set wait_ready to False than the timeout here doesn't do anything. but yea it would help if we want to set wait_ready back to True in the future.

path_2024.py Outdated
@@ -23,6 +23,7 @@
KML_FILE_PREFIX = "waypoints_log"
DELAY = 0.1 # seconds
MAXIMUM_FLIGHT_TIME = 1800 # seconds
TIMEOUT = 30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: add a comment like # seconds

@mgupta27 mgupta27 merged commit e6e3cee into main Mar 17, 2024
1 check passed
@mgupta27 mgupta27 deleted the add-timeout-to-wait-ready branch March 17, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants