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: Siyi waits for non-zero cam firmware version #26168

Merged

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Feb 8, 2024

The Siyi A8 (at least) will report an all-zero camera firmware version for the first 20seconds after startup. Assuming the gimbal and autopilot are powered up together this may or may not result in a warning sent to the user (see below):

This PR changes the Siyi mount driver so that it does not complete initialisation until a non-zero camera version is provided.

The only downside is Siyi gimbals that always report camera fw version of 0,0,0 will become unusable. I'm not aware of any Siyi gimbals that do this however.

This has been tested on real hardware.

Before:
image

After:
image

Related discussion is here.

_fw_version.gimbal.major = _msg_buff[_msg_buff_data_start+6]; // firmware major version
_fw_version.gimbal.minor = _msg_buff[_msg_buff_data_start+5]; // firmware minor version
_fw_version.gimbal.patch = _msg_buff[_msg_buff_data_start+4]; // firmware revision (aka patch)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a timeout on this? What if there is a problem and the camera keeps reporting 0.0.0, perhaps the user needs to know that? This will just wait and wait right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timtuxworth,

Yes, that's the downside I mention in the PR description above. I'm not aware of any Siyi cameras that ever do this though so I'm not sure if it is worth the extra code to protect against this.

@timtuxworth
Copy link
Contributor

I compiled this into a local copy of Plane 4.5.0 beta 1 and can confirm that it now reports the correct camera version!

@peterbarker peterbarker merged commit 0fca670 into ArduPilot:master Feb 9, 2024
92 checks passed
@peterbarker
Copy link
Contributor

Merged, thanks! Also marked to make sure it gets into 4.5

@rmackay9 rmackay9 deleted the mount-siyi-wait-for-nonzero-cam-fw branch February 10, 2024 00:13
@rmackay9 rmackay9 mentioned this pull request Feb 13, 2024
92 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 4.5.0-beta2
Development

Successfully merging this pull request may close these issues.

3 participants