Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Camera_servo: allow focus and zoom control #29247

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Williangalvani
Copy link
Contributor

@Williangalvani Williangalvani commented Feb 7, 2025

We want to control our camera's focus and pwm through ardupilot.

@@ -43,6 +49,28 @@ bool AP_Camera_Servo::trigger_pic()
return true;
}


bool AP_Camera_Servo::set_zoom(ZoomType zoom_type, float zoom_value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, thanks for this. Small nitpick is in the cpp files we put the bracket on the next line

@@ -29,12 +29,20 @@ class AP_Camera_Servo : public AP_Camera_Backend
// Constructor
using AP_Camera_Backend::AP_Camera_Backend;

void init() override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put the init lower like it is in other drivers. Also if possible can we put a comment above it? I know it's pretty obvious what "init" is for but all our other methods have comments so I'd like to keep it consistent

@@ -6,6 +6,12 @@

extern const AP_HAL::HAL& hal;


void AP_Camera_Servo::init() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too let's put a comment and put the bracket on the next line

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 8, 2025

Except for the minor formatting items this looks pretty good to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants