APM:Libraries
|
#include <AP_Mount.h>
Classes | |
struct | mount_state |
Public Types | |
enum | MountType { Mount_Type_None = 0, Mount_Type_Servo = 1, Mount_Type_SoloGimbal = 2, Mount_Type_Alexmos = 3, Mount_Type_SToRM32 = 4, Mount_Type_SToRM32_serial = 5 } |
Public Member Functions | |
AP_Mount (const AP_AHRS_TYPE &ahrs, const struct Location ¤t_loc) | |
AP_Mount (const AP_Mount &other)=delete | |
AP_Mount & | operator= (const AP_Mount &)=delete |
void | init (const AP_SerialManager &serial_manager) |
void | update () |
void | update_fast () |
AP_Mount::MountType | get_mount_type () const |
AP_Mount::MountType | get_mount_type (uint8_t instance) const |
bool | has_pan_control () const |
bool | has_pan_control (uint8_t instance) const |
enum MAV_MOUNT_MODE | get_mode () const |
enum MAV_MOUNT_MODE | get_mode (uint8_t instance) const |
void | set_mode (enum MAV_MOUNT_MODE mode) |
void | set_mode (uint8_t instance, enum MAV_MOUNT_MODE mode) |
void | set_mode_to_default () |
void | set_mode_to_default (uint8_t instance) |
void | set_angle_targets (float roll, float tilt, float pan) |
void | set_angle_targets (uint8_t instance, float roll, float tilt, float pan) |
void | set_roi_target (const struct Location &target_loc) |
void | set_roi_target (uint8_t instance, const struct Location &target_loc) |
void | control (int32_t pitch_or_lat, int32_t roll_or_lon, int32_t yaw_or_alt, enum MAV_MOUNT_MODE mount_mode) |
void | control (uint8_t instance, int32_t pitch_or_lat, int32_t roll_or_lon, int32_t yaw_or_alt, enum MAV_MOUNT_MODE mount_mode) |
void | configure_msg (mavlink_message_t *msg) |
void | configure_msg (uint8_t instance, mavlink_message_t *msg) |
void | control_msg (mavlink_message_t *msg) |
void | control_msg (uint8_t instance, mavlink_message_t *msg) |
void | handle_param_value (mavlink_message_t *msg) |
void | handle_gimbal_report (mavlink_channel_t chan, mavlink_message_t *msg) |
void | send_gimbal_report (mavlink_channel_t chan) |
void | status_msg (mavlink_channel_t chan) |
Return mount status information. More... | |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Protected Attributes | |
const AP_AHRS_TYPE & | _ahrs |
const struct Location & | _current_loc |
AP_Int8 | _joystick_speed |
uint8_t | _num_instances |
uint8_t | _primary |
AP_Mount_Backend * | _backends [AP_MOUNT_MAX_INSTANCES] |
struct AP_Mount::mount_state | state [AP_MOUNT_MAX_INSTANCES] |
Friends | |
class | AP_Mount_Backend |
class | AP_Mount_Servo |
class | AP_Mount_SoloGimbal |
class | AP_Mount_Alexmos |
class | AP_Mount_SToRM32 |
class | AP_Mount_SToRM32_serial |
Definition at line 47 of file AP_Mount.h.
enum AP_Mount::MountType |
Definition at line 66 of file AP_Mount.h.
AP_Mount::AP_Mount | ( | const AP_AHRS_TYPE & | ahrs, |
const struct Location & | current_loc | ||
) |
|
delete |
|
inline |
Definition at line 119 of file AP_Mount.h.
Referenced by configure_msg().
void AP_Mount::configure_msg | ( | uint8_t | instance, |
mavlink_message_t * | msg | ||
) |
Change the configuration of the mount triggered by a MavLink packet.
Definition at line 564 of file AP_Mount.cpp.
|
inline |
Definition at line 115 of file AP_Mount.h.
Referenced by control().
void AP_Mount::control | ( | uint8_t | instance, |
int32_t | pitch_or_lat, | ||
int32_t | roll_or_lon, | ||
int32_t | yaw_or_alt, | ||
enum MAV_MOUNT_MODE | mount_mode | ||
) |
|
inline |
Definition at line 123 of file AP_Mount.h.
Referenced by control_msg().
void AP_Mount::control_msg | ( | uint8_t | instance, |
mavlink_message_t * | msg | ||
) |
Control the mount (depends on the previously set mount configuration) triggered by a MavLink packet.
Definition at line 576 of file AP_Mount.cpp.
MAV_MOUNT_MODE AP_Mount::get_mode | ( | uint8_t | instance | ) | const |
Definition at line 522 of file AP_Mount.cpp.
|
inline |
Definition at line 93 of file AP_Mount.h.
Referenced by AP_Mount_Backend::control(), and AP_Mount_Backend::get_mode().
|
inline |
Definition at line 85 of file AP_Mount.h.
Referenced by get_mount_type(), and init().
AP_Mount::MountType AP_Mount::get_mount_type | ( | uint8_t | instance | ) | const |
Definition at line 501 of file AP_Mount.cpp.
void AP_Mount::handle_gimbal_report | ( | mavlink_channel_t | chan, |
mavlink_message_t * | msg | ||
) |
Definition at line 617 of file AP_Mount.cpp.
Referenced by control_msg(), and GCS_MAVLINK::handle_gimbal_report().
void AP_Mount::handle_param_value | ( | mavlink_message_t * | msg | ) |
Definition at line 627 of file AP_Mount.cpp.
Referenced by control_msg().
|
inline |
Definition at line 89 of file AP_Mount.h.
Referenced by has_pan_control().
bool AP_Mount::has_pan_control | ( | uint8_t | instance | ) | const |
void AP_Mount::init | ( | const AP_SerialManager & | serial_manager | ) |
void AP_Mount::send_gimbal_report | ( | mavlink_channel_t | chan | ) |
Definition at line 637 of file AP_Mount.cpp.
Referenced by control_msg().
|
inline |
Definition at line 107 of file AP_Mount.h.
Referenced by set_angle_targets().
void AP_Mount::set_angle_targets | ( | uint8_t | instance, |
float | roll, | ||
float | tilt, | ||
float | pan | ||
) |
|
inline |
Definition at line 98 of file AP_Mount.h.
Referenced by AP_Mount_Backend::control(), AP_Mount_Backend::set_angle_targets(), set_mode(), set_mode_to_default(), and AP_Mount_Backend::set_roi_target().
void AP_Mount::set_mode | ( | uint8_t | instance, |
enum MAV_MOUNT_MODE | mode | ||
) |
|
inline |
Definition at line 103 of file AP_Mount.h.
Referenced by set_mode_to_default().
void AP_Mount::set_mode_to_default | ( | uint8_t | instance | ) |
|
inline |
Definition at line 111 of file AP_Mount.h.
Referenced by set_roi_target().
void AP_Mount::set_roi_target | ( | uint8_t | instance, |
const struct Location & | target_loc | ||
) |
void AP_Mount::status_msg | ( | mavlink_channel_t | chan | ) |
Return mount status information.
Definition at line 597 of file AP_Mount.cpp.
Referenced by control_msg().
void AP_Mount::update | ( | void | ) |
void AP_Mount::update_fast | ( | ) |
|
friend |
Definition at line 53 of file AP_Mount.h.
Referenced by init().
|
friend |
Definition at line 50 of file AP_Mount.h.
|
friend |
Definition at line 51 of file AP_Mount.h.
Referenced by init().
|
friend |
Definition at line 52 of file AP_Mount.h.
Referenced by init().
|
friend |
Definition at line 54 of file AP_Mount.h.
Referenced by init().
|
friend |
Definition at line 55 of file AP_Mount.h.
Referenced by init().
|
protected |
Definition at line 143 of file AP_Mount.h.
Referenced by AP_Mount_Backend::calc_angle_to_location(), and AP_Mount_Servo::stabilize().
|
protected |
Definition at line 152 of file AP_Mount.h.
Referenced by AP_Mount(), configure_msg(), control(), control_msg(), handle_gimbal_report(), handle_param_value(), has_pan_control(), init(), send_gimbal_report(), set_angle_targets(), set_mode(), set_roi_target(), status_msg(), update(), and update_fast().
|
protected |
Definition at line 144 of file AP_Mount.h.
Referenced by AP_Mount_Backend::calc_angle_to_location().
|
protected |
Definition at line 147 of file AP_Mount.h.
Referenced by AP_Mount_Backend::update_targets_from_rc().
|
protected |
Definition at line 150 of file AP_Mount.h.
Referenced by init().
|
protected |
Definition at line 151 of file AP_Mount.h.
Referenced by configure_msg(), control(), control_msg(), get_mode(), get_mount_type(), has_pan_control(), init(), set_angle_targets(), set_mode(), set_mode_to_default(), and set_roi_target().
|
protected |
Referenced by get_mode(), get_mount_type(), init(), and set_mode_to_default().
|
static |
Definition at line 139 of file AP_Mount.h.
Referenced by AP_Mount().