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

Mount: fix serial port used for 2nd serial driver #27129

Merged
merged 5 commits into from
May 22, 2024

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented May 22, 2024

This PR fixes a bug in our three serial mount drivers which currently always try to use the first serial port defined for use with gimbals (e.g. SERIALx_PROTOCOL = 8/Gimbal). The bug appears when the user tries to set up two serial mounts.

The fix uses a similar pattern to our rangefinder drivers in that we track the serial driver instance and pass that into the constructor. This serial instance (instead of the regular instance) is used when searching for the serial port.

This has been lightly tested on CubeRed connectded to a Siyi A8 (over ethernet) and ViewPro A10 (over serial). Below is a picture of the new QGC 4.4 that includes support for controlling multiple gimbals. Using the changes in this PR I was able to control both gimbals independently.
image

It will likely be difficult to get testing done for the SToRM32.

This resolves issue #27090

FYI @timtuxworth, I'm happy to build you a binary if you'd also like to test. Alternatively it may be merged to master/latest soon.

@tridge tridge merged commit 72b5efd into ArduPilot:master May 22, 2024
91 checks passed
@rmackay9 rmackay9 deleted the mount-serial-backend branch May 22, 2024 08:13
@IamPete1 IamPete1 removed the DevCallEU label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants