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

Handle digicam messages as COMMAND_INT as well as COMMAND_LONG #25409

Merged

Conversation

peterbarker
Copy link
Contributor

Added more tests into the autotest suite to ensure fields get passed through appropriately.

The integer fields in these commands are used for integer values (enumeration / de-dupe sequencing / exposure integer), so that's handy.

Comments on what the command fields mean can be found in the message equivalents of the commands.

@peterbarker peterbarker force-pushed the pr/digicam-messages-as-command-int branch from f22fbe5 to 0c44593 Compare November 1, 2023 01:37
@@ -96,12 +96,12 @@ class AP_Camera {
void send_camera_settings(mavlink_channel_t chan);

// configure camera
void configure(float shooting_mode, float shutter_speed, float aperture, float ISO, float exposure_type, float cmd_id, float engine_cutoff_time);
void configure(uint8_t instance, float shooting_mode, float shutter_speed, float aperture, float ISO, float exposure_type, float cmd_id, float engine_cutoff_time);
void configure(float shooting_mode, float shutter_speed, float aperture, float ISO, uint32_t exposure_type, uint32_t cmd_id, float engine_cutoff_time);
Copy link
Contributor

Choose a reason for hiding this comment

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

int32_t to match type in COMMAND_INT, also to cope if someone used a -1 float

@@ -161,10 +161,10 @@ void AP_Camera_Backend::stop_capture()
}

// handle camera control
void AP_Camera_Backend::control(float session, float zoom_pos, float zoom_step, float focus_lock, float shooting_cmd, float cmd_id)
void AP_Camera_Backend::control(float session, float zoom_pos, float zoom_step, float focus_lock, uint32_t shooting_cmd, uint32_t cmd_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

int32_t

@@ -89,10 +89,10 @@ class AP_Camera_Backend
virtual void handle_message(mavlink_channel_t chan, const mavlink_message_t &msg) {}

// configure camera
virtual void configure(float shooting_mode, float shutter_speed, float aperture, float ISO, float exposure_type, float cmd_id, float engine_cutoff_time) {}
virtual void configure(float shooting_mode, float shutter_speed, float aperture, float ISO, uint32_t exposure_type, uint32_t cmd_id, float engine_cutoff_time) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

int32_t

@tridge tridge removed the DevCallEU label Nov 1, 2023
@tridge
Copy link
Contributor

tridge commented Nov 1, 2023

fine to merge when no signed -> unsigned changes

@peterbarker peterbarker force-pushed the pr/digicam-messages-as-command-int branch from 0c44593 to 610fd85 Compare November 1, 2023 11:41
@peterbarker peterbarker merged commit 0e22618 into ArduPilot:master Nov 2, 2023
86 checks passed
@peterbarker peterbarker deleted the pr/digicam-messages-as-command-int branch November 2, 2023 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants