AP_Camera: constify get_instance

This commit is contained in:
Randy Mackay 2023-04-08 11:33:22 +09:00 committed by Peter Barker
parent 5d29935039
commit 58b73c3613
2 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ bool AP_Camera::set_auto_focus(uint8_t instance)
}
// return backend for instance number
AP_Camera_Backend *AP_Camera::get_instance(uint8_t instance)
AP_Camera_Backend *AP_Camera::get_instance(uint8_t instance) const
{
if (instance >= ARRAY_SIZE(_backends)) {
return nullptr;

View File

@ -150,7 +150,7 @@ private:
AP_Int16 _max_roll; // Maximum acceptable roll angle when trigging camera
// check instance number is valid
AP_Camera_Backend *get_instance(uint8_t instance);
AP_Camera_Backend *get_instance(uint8_t instance) const;
// perform any required parameter conversion
void convert_params();