mirror of https://github.com/ArduPilot/ardupilot
RC_Channel: add and use SetFocusResult
This commit is contained in:
parent
485fee36ab
commit
daf56c5ab1
|
@ -972,7 +972,7 @@ bool RC_Channel::do_aux_function_camera_manual_focus(const AuxSwitchPos ch_flag)
|
|||
focus_step = -1;
|
||||
break;
|
||||
}
|
||||
return camera->set_focus(FocusType::RATE, focus_step);
|
||||
return camera->set_focus(FocusType::RATE, focus_step) == SetFocusResult::ACCEPTED;
|
||||
}
|
||||
|
||||
bool RC_Channel::do_aux_function_camera_auto_focus(const AuxSwitchPos ch_flag)
|
||||
|
@ -982,7 +982,7 @@ bool RC_Channel::do_aux_function_camera_auto_focus(const AuxSwitchPos ch_flag)
|
|||
if (camera == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return camera->set_focus(FocusType::AUTO, 0);
|
||||
return camera->set_focus(FocusType::AUTO, 0) == SetFocusResult::ACCEPTED;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue