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

Created download_commands function in flight_controller.py #43

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

AlexLe68
Copy link
Contributor

No description provided.

Copy link
Contributor

@AaronWang04 AaronWang04 left a comment

Choose a reason for hiding this comment

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

almost there, generally looks good

return []
except ConnectionResetError:
print("ERROR: Connection with drone reset. Unable to download commands.")
return []
Copy link
Contributor

Choose a reason for hiding this comment

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

add an empty blank line at the bottom of file (good convention)

command_sequence.download()
command_sequence.wait_ready()
commands = list(command_sequence)
return commands
Copy link
Contributor

Choose a reason for hiding this comment

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

you should return whether the operation was successful with a bool

so the function should return tuple[bool, List[dronekit.Command]]

@@ -47,6 +47,15 @@ def main() -> int:

time.sleep(DELAY_TIME)

# Download and print commands
commands = controller.download_commands()
Copy link
Contributor

Choose a reason for hiding this comment

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

don't forget to change here when you change the return types!

@AaronWang04 AaronWang04 merged commit e29bdd5 into UWARG:main Jul 22, 2024
1 check passed
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