Open
Conversation
andy24Dai
reviewed
Sep 23, 2025
| print("GPS: No data") | ||
|
|
||
| # Test camera feed every 3 seconds | ||
| if int(current_time) % 3 == 0 and current_time > 1: |
Contributor
There was a problem hiding this comment.
The camera test should be assuming no access to the emulators, try creating a video stream using cv2 and checking if it's receiving video.
honzikschenk
requested changes
Oct 1, 2025
Contributor
honzikschenk
left a comment
There was a problem hiding this comment.
Minor changes; looks good so far!
modules/mavlink/flight_controller.py
Outdated
| try: | ||
| loc = self.drone.location | ||
| except Exception: # pylint: disable=broad-except | ||
| print("HITL get_location error") |
Contributor
There was a problem hiding this comment.
Generalize this error message (ie. say something like "Error with requesting location" or "get_location could not complete request"). flight_controller is used on our general airside system
modules/mavlink/flight_controller.py
Outdated
| def get_location(self) -> "tuple[bool, tuple[float, float, float] | None]": | ||
| """Return (lat, lon, alt) if available via the drone, otherwise (False, None).""" | ||
| try: | ||
| loc = self.drone.location |
Contributor
There was a problem hiding this comment.
Depending on how your test goes, you might have to replace this with receiving the "GLOBAL_POSITION_INT" mavlink message
Honzik may have been right, hopefully get to test this before finals
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added a method in flight controller for gps data
reads camera emulator's current frame to check if camera feed is active