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

AP_Camera/AP_Mount/GCS_MAVLink: Siyi implements camera-thermal-range #27915

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Aug 24, 2024

This PR adds support for sending the min and max temperatures and their XY positions in the live video stream to the ground station when using Siyi ZT6 and ZT30 cameras. We can add support for ViewPro and Topotek cameras in a follow-up PRs.

This is useful for search & rescue and firefighting applications because the ground station can overlay a rectangle over the hotspot along with its temperature.

This PR relies on this mavlink PR ArduPilot/mavlink#369 (and the equivalent upstream PR mavlink/mavlink#2145).

It is also built on PR #27890 and PR #27911 so those should be merged first.

This has been lightly tested on real-hardware (a CubeOrange + Siyi ZT6) and below is a screen shot showing the temperature jump when I moved in front of the camera although please note that the test used named value pairs to send the temperatures and positions instead of using the new mavlink message.

temp-minmax-test

@rmackay9
Copy link
Contributor Author

rmackay9 commented Sep 2, 2024

This has been updated inline with discussion on the upstream mavlink PR mavlink/mavlink#2145

@rmackay9 rmackay9 changed the title AP_Camera/AP_Mount/GCS_MAVLink: Siyi implements camera-thermal-status AP_Camera/AP_Mount/GCS_MAVLink: Siyi implements camera-thermal-range Sep 3, 2024
@rmackay9
Copy link
Contributor Author

rmackay9 commented Sep 5, 2024

I've updated this to use the final CAMERA_THERMAL_RANGE mavlink message definition and also hidden the feature behind a define

Currently the new message is only sent if requested by the GCS (e.g. not sent by default)

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

LGTM past these

libraries/AP_Camera/AP_Camera_Mount.cpp Outdated Show resolved Hide resolved
libraries/GCS_MAVLink/GCS_Common.cpp Show resolved Hide resolved
@rmackay9
Copy link
Contributor Author

feature size info

Binary Name      Text [B]        Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  --------------  -----------  -------------  ----------------------------  -------------------------
arducopter       692 (+0.0384%)  0 (0.0000%)  4 (+0.0015%)   692 (+0.0384%)                                   161192
antennatracker   108 (+0.0081%)  0 (0.0000%)  4 (+0.0015%)   108 (+0.0081%)                                   631524
arducopter-heli  692 (+0.0385%)  0 (0.0000%)  -4 (-0.0015%)  692 (+0.0384%)                                   162160
ardusub          692 (+0.0435%)  0 (0.0000%)  -4 (-0.0015%)  692 (+0.0434%)                                   370788
ardurover        688 (+0.0417%)  0 (0.0000%)  0 (0.0000%)    688 (+0.0416%)                                   312848
blimp            112 (+0.0083%)  0 (0.0000%)  0 (0.0000%)    112 (+0.0083%)                                   609312
arduplane        696 (+0.0387%)  0 (0.0000%)  0 (0.0000%)    696 (+0.0386%)                                   164248

@rmackay9 rmackay9 force-pushed the siyi-get-temp branch 2 times, most recently from 3ce4c4e to 549bbcb Compare September 10, 2024 00:40
@rmackay9 rmackay9 dismissed peterbarker’s stale review September 10, 2024 06:31

PeterB's requests implemented, txs for the review!

@rmackay9 rmackay9 merged commit 1f61b64 into ArduPilot:master Sep 10, 2024
94 checks passed
@rmackay9 rmackay9 deleted the siyi-get-temp branch September 10, 2024 12:04
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