mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
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:
committed by
Peter Barker
parent
3a98d0877d
commit
5becbdd49f
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user