AP_Camera: report interval capture when capturing until stopped

CAMERA_CAPTURE_STATUS.image_status was calculated from num_remaining
being positive, but take_multiple_pictures sets num_remaining to -1 when
asked to capture until stopped, so a camera capturing on an interval
forever reported itself idle.  Test num_remaining the same way update()
does when deciding whether to take the next image.
This commit is contained in:
Peter Barker
2026-07-31 09:16:30 +10:00
committed by Peter Barker
parent 3a98d0877d
commit 5becbdd49f
+2 -1
View File
@@ -346,7 +346,8 @@ void AP_Camera_Backend::send_camera_fov_status(mavlink_channel_t chan) const
void AP_Camera_Backend::send_camera_capture_status(mavlink_channel_t chan) const
{
// Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)
const uint8_t image_status = (time_interval_settings.num_remaining > 0) ? 2 : 0;
// num_remaining is -1 when capturing until stopped, so test the same way update() does
const uint8_t image_status = (time_interval_settings.num_remaining != 0) ? 2 : 0;
// send CAMERA_CAPTURE_STATUS message
mavlink_msg_camera_capture_status_send(