-
Notifications
You must be signed in to change notification settings - Fork 8
Periodic hitl #89
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
Merged
+212
−25
Merged
Periodic hitl #89
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9060698
Adds multithreading to hitl modules
honzikschenk 5af546e
Adds flight controller start method for hitl threading
honzikschenk 7670062
Removes positions json path
honzikschenk 2bf98af
Adds proper position listening for mission waypoints in hitl
honzikschenk 0f606b1
Removes camera part of threading test
honzikschenk af59f0f
Actually removes camera from test
honzikschenk 0cb60ab
Fixes time sleep function in hitl threading
honzikschenk b2af852
Makes gps speed faster
honzikschenk c0d4331
Moves position frequency control to position module
honzikschenk da74d86
Changes threading test order
honzikschenk a25cbc9
Fixes linting issues
honzikschenk 665224b
Fixes port for physical test
honzikschenk ae2958d
Removes auto mode and waypoint injection from threading test
honzikschenk 1149b62
Removes stuff
honzikschenk d5c26ed
Adds time between images as a parameter
honzikschenk 7b2295f
Format fix
honzikschenk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """ | ||
| Tests the threading behavior of the HITL module (gps and camera modules). | ||
| """ | ||
|
|
||
| # Physical connection to Pixhawk: /dev/ttyAMA0 | ||
| # Simulated connection to Pixhawk: tcp:localhost:5762 | ||
| PIXHAWK_ADDRESS = "/dev/ttyAMA0" | ||
|
|
||
| import os | ||
| import time | ||
| from modules.mavlink import flight_controller | ||
|
|
||
|
|
||
| def main() -> int: | ||
| """ | ||
| Main function. | ||
| """ | ||
| images_folder_path = os.path.join("tests", "integration", "camera_emulator", "images") | ||
|
|
||
| result, controller = flight_controller.FlightController.create( | ||
| PIXHAWK_ADDRESS, 57600, True, True, True, images_folder_path | ||
| ) | ||
| if not result: | ||
| print("Failed to create flight controller") | ||
| return -1 | ||
|
|
||
| time.sleep(10) | ||
|
|
||
| return 0 | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| result_main = main() | ||
| if result_main != 0: | ||
| print(f"ERROR: Status code: {result_main}") | ||
|
|
||
| print("Done!") |
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.
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.
should we make next image time a parameter?