-
Notifications
You must be signed in to change notification settings - Fork 37
Added new integration test for communication to ground #248
Conversation
maxlou05
left a comment
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.
Reviewed
|
|
||
|
|
||
| MAVLINK_CONNECTION_ADDRESS = "tcp:localhost:14550" | ||
| FLIGHT_INTERFACE_TIMEOUT = 10.0 # seconds |
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 might want to give it a little more than 10 seconds, like 30 maybe?
| try: | ||
| # pylint: disable=unused-variable | ||
| for i in range(len(gps_coordinates)): | ||
| data = out_queue.queue.get_nowait() | ||
| print(f"MAVLink data sent by drone: {data}") | ||
| except queue.Empty: | ||
| print("Output queue is empty.") | ||
| return False | ||
|
|
||
| print("apply_communications_test completed successfully") | ||
| return True |
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.
The flight controller will not place anything in the output queue, it is up to the test operator to open up mission planner or the groundside repo to check for MAVLink messages. You can print a help message here instead linking the statustext-parser-2025 repo or give instructions to open mission planner's MAVLink inspector
maxlou05
left a comment
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.
Reviewed
| if not success: | ||
| return False | ||
| in_queue.queue.put(gps_coordinate) |
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 use common's message encoding decoding for each element in the coordinate list, and then make a metadata message before hand (specifies list has length 4) and then put the 4 messages in. See #247 https://github.com/UWARG/computer-vision-python/pull/247/files#diff-025985869e9f5360f5e7837cc21c97288c6fea07b7515f4d3317bfe775f0cd0a
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.
Oh, and also use the new input queue as stated below
115168a to
248f2ea
Compare
maxlou05
left a comment
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.
Reviewed
| return False | ||
|
|
||
| success, message = message_encoding_decoding.encode_position_global( | ||
| "FLIGHT_INTERFACE_WORKER", gps_coordinate |
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.
Just wait until Herman does his common change, and you'll use the worker enum here later
593578d to
248f2ea
Compare
maxlou05
left a comment
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.
Conditionally approved
| FLIGHT_INTERFACE_TIMEOUT = 30.0 # seconds | ||
| FLIGHT_INTERFACE_BAUD_RATE = 57600 # symbol rate | ||
| FLIGHT_INTERFACE_WORKER_PERIOD = 0.1 # seconds | ||
| WORKER_NAME = "FLIGHT_INTERFACE_WORKER" |
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.
Great! Just update your common to the newest remote version and then use the worker enum here instead of a string (Herman has that merged in)
No description provided.