mirror of https://github.com/ArduPilot/ardupilot
Plane: enable messages for MAVLink gimbal support
This commit is contained in:
parent
b1f7b80f7e
commit
97687f04af
|
@ -703,11 +703,17 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id)
|
|||
#endif
|
||||
break;
|
||||
|
||||
case MSG_GIMBAL_REPORT:
|
||||
#if MOUNT == ENABLED
|
||||
CHECK_PAYLOAD_SIZE(GIMBAL_REPORT);
|
||||
plane.camera_mount.send_gimbal_report(chan);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case MSG_RETRY_DEFERRED:
|
||||
break; // just here to prevent a warning
|
||||
|
||||
case MSG_LIMITS_STATUS:
|
||||
case MSG_GIMBAL_REPORT:
|
||||
// unused
|
||||
break;
|
||||
}
|
||||
|
@ -940,6 +946,7 @@ GCS_MAVLINK::data_stream_send(void)
|
|||
send_message(MSG_MOUNT_STATUS);
|
||||
send_message(MSG_OPTICAL_FLOW);
|
||||
send_message(MSG_EKF_STATUS_REPORT);
|
||||
send_message(MSG_GIMBAL_REPORT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1454,6 +1461,14 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
|||
break;
|
||||
}
|
||||
|
||||
case MAVLINK_MSG_ID_GIMBAL_REPORT:
|
||||
{
|
||||
#if MOUNT == ENABLED
|
||||
handle_gimbal_report(plane.camera_mount, msg);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE:
|
||||
{
|
||||
// allow override of RC channel values for HIL
|
||||
|
|
|
@ -175,6 +175,13 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd)
|
|||
camera_mount.set_roi_target(cmd.content.location);
|
||||
}
|
||||
break;
|
||||
|
||||
case MAV_CMD_DO_MOUNT_CONTROL: // 205
|
||||
// point the camera to a specified angle
|
||||
camera_mount.set_angle_targets(cmd.content.mount_control.roll,
|
||||
cmd.content.mount_control.pitch,
|
||||
cmd.content.mount_control.yaw);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -247,7 +254,6 @@ bool Plane::verify_command(const AP_Mission::Mission_Command& cmd) // Ret
|
|||
case MAV_CMD_DO_SET_CAM_TRIGG_DIST:
|
||||
case MAV_CMD_NAV_ROI:
|
||||
case MAV_CMD_DO_MOUNT_CONFIGURE:
|
||||
case MAV_CMD_DO_MOUNT_CONTROL:
|
||||
case MAV_CMD_DO_INVERTED_FLIGHT:
|
||||
case MAV_CMD_DO_LAND_START:
|
||||
case MAV_CMD_DO_FENCE_ENABLE:
|
||||
|
|
Loading…
Reference in New Issue