-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
There was a problem hiding this 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
mavlink/modules/flight_controller.py
Outdated
return [] | ||
except ConnectionResetError: | ||
print("ERROR: Connection with drone reset. Unable to download commands.") | ||
return [] |
There was a problem hiding this comment.
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)
mavlink/modules/flight_controller.py
Outdated
command_sequence.download() | ||
command_sequence.wait_ready() | ||
commands = list(command_sequence) | ||
return commands |
There was a problem hiding this comment.
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]]
mavlink/test_flight_controller.py
Outdated
@@ -47,6 +47,15 @@ def main() -> int: | |||
|
|||
time.sleep(DELAY_TIME) | |||
|
|||
# Download and print commands | |||
commands = controller.download_commands() |
There was a problem hiding this comment.
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!
No description provided.