/// decode MavLink that controls camera void AP_Camera::control_msg(mavlink_message_t* msg) { __mavlink_digicam_control_t packet; mavlink_msg_digicam_control_decode(msg, &packet); if (mavlink_check_target(packet.target_system, packet.target_component)) { // not for us return; } // This values may or not be used by APM (the shot is) // They are bypassed as "echo" to a external specialized board /* * packet.command_id * packet.extra_param * packet.extra_value * packet.focus_lock * packet.session * packet.shot * packet.zoom_pos * packet.zoom_step */ if (packet.shot) { trigger_pic(); } // echo the message to the ArduCam OSD camera control board // for more info see: http://code.google.com/p/arducam-osd/ // TODO is it connected to MAVLINK_COMM_3 ? mavlink_msg_digicam_control_send(MAVLINK_COMM_3, packet.target_system, packet.target_component, packet.session, packet.zoom_pos, packet.zoom_step, packet.focus_lock, packet.shot, packet.command_id, packet.extra_param, packet.extra_value); }
/// decode MavLink that controls camera void AP_Camera::control_msg(mavlink_message_t* msg) { __mavlink_digicam_control_t packet; mavlink_msg_digicam_control_decode(msg, &packet); if (mavlink_check_target(packet.target_system, packet.target_component)) { // not for us return; } // TODO do something with these values /* packet.command_id packet.extra_param packet.extra_value packet.focus_lock packet.session packet.shot packet.zoom_pos packet.zoom_step */ if (packet.shot) { trigger_pic(); } // echo the message to the ArduCam OSD camera control board // for more info see: http://code.google.com/p/arducam-osd/ // TODO is it connected to MAVLINK_COMM_3 ? mavlink_msg_digicam_control_send(MAVLINK_COMM_3, packet.target_system, packet.target_component, packet.session, packet.zoom_pos, packet.zoom_step, packet.focus_lock, packet.shot, packet.command_id, packet.extra_param, packet.extra_value); }