Copter: handle do_mount_control mission commands
This commit is contained in:
parent
8a3a7bdcd1
commit
a3933f7a1f
@ -19,6 +19,7 @@ static void do_yaw(const AP_Mission::Mission_Command& cmd);
|
||||
static void do_change_speed(const AP_Mission::Mission_Command& cmd);
|
||||
static void do_set_home(const AP_Mission::Mission_Command& cmd);
|
||||
static void do_roi(const AP_Mission::Mission_Command& cmd);
|
||||
static void do_mount_control(const AP_Mission::Mission_Command& cmd);
|
||||
#if PARACHUTE == ENABLED
|
||||
static void do_parachute(const AP_Mission::Mission_Command& cmd);
|
||||
#endif
|
||||
@ -137,6 +138,11 @@ static bool start_command(const AP_Mission::Mission_Command& cmd)
|
||||
do_roi(cmd);
|
||||
break;
|
||||
|
||||
case MAV_CMD_DO_MOUNT_CONTROL: // 205
|
||||
// point the camera to a specified angle
|
||||
do_mount_control(cmd);
|
||||
break;
|
||||
|
||||
#if CAMERA == ENABLED
|
||||
case MAV_CMD_DO_CONTROL_VIDEO: // Control on-board camera capturing. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty|
|
||||
break;
|
||||
@ -893,3 +899,11 @@ static void do_take_picture()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// point the camera to a specified angle
|
||||
static void do_mount_control(const AP_Mission::Mission_Command& cmd)
|
||||
{
|
||||
#if MOUNT == ENABLED
|
||||
camera_mount.set_angle_targets(cmd.content.mount_control.roll, cmd.content.mount_control.pitch, cmd.content.mount_control.yaw);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user