mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_Camera: image-stop-capture fix for instance
This commit is contained in:
parent
fb35d97abf
commit
999a3fe8d9
@ -358,12 +358,15 @@ MAV_RESULT AP_Camera::handle_command_long(const mavlink_command_long_t &packet)
|
||||
}
|
||||
case MAV_CMD_IMAGE_STOP_CAPTURE:
|
||||
// param1 : camera id
|
||||
if (is_negative(packet.param1)) {
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
}
|
||||
if (is_zero(packet.param1)) {
|
||||
// stop capture for every backend
|
||||
stop_capture();
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
}
|
||||
if (stop_capture(packet.param1)) {
|
||||
if (stop_capture(packet.param1-1)) {
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
}
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
|
Loading…
Reference in New Issue
Block a user