APM:Libraries
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
AP_Mount Class Reference

#include <AP_Mount.h>

Collaboration diagram for AP_Mount:
[legend]

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 &current_loc)
 
 AP_Mount (const AP_Mount &other)=delete
 
AP_Mountoperator= (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
 

Detailed Description

Definition at line 47 of file AP_Mount.h.

Member Enumeration Documentation

◆ MountType

Enumerator
Mount_Type_None 
Mount_Type_Servo 

no mount

Mount_Type_SoloGimbal 

servo controlled mount

Mount_Type_Alexmos 

Solo's gimbal.

Mount_Type_SToRM32 

Alexmos mount.

Mount_Type_SToRM32_serial 

SToRM32 mount using MAVLink protocol.

Definition at line 66 of file AP_Mount.h.

Constructor & Destructor Documentation

◆ AP_Mount() [1/2]

AP_Mount::AP_Mount ( const AP_AHRS_TYPE ahrs,
const struct Location current_loc 
)

Definition at line 396 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ AP_Mount() [2/2]

AP_Mount::AP_Mount ( const AP_Mount other)
delete

Member Function Documentation

◆ configure_msg() [1/2]

void AP_Mount::configure_msg ( mavlink_message_t *  msg)
inline

Definition at line 119 of file AP_Mount.h.

Referenced by configure_msg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configure_msg() [2/2]

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.

Here is the call graph for this function:

◆ control() [1/2]

void AP_Mount::control ( 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 115 of file AP_Mount.h.

Referenced by control().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ control() [2/2]

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 
)

Definition at line 586 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ control_msg() [1/2]

void AP_Mount::control_msg ( mavlink_message_t *  msg)
inline

Definition at line 123 of file AP_Mount.h.

Referenced by control_msg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ control_msg() [2/2]

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.

Here is the call graph for this function:

◆ get_mode() [1/2]

MAV_MOUNT_MODE AP_Mount::get_mode ( uint8_t  instance) const

Definition at line 522 of file AP_Mount.cpp.

◆ get_mode() [2/2]

enum MAV_MOUNT_MODE AP_Mount::get_mode ( ) const
inline

Definition at line 93 of file AP_Mount.h.

Referenced by AP_Mount_Backend::control(), and AP_Mount_Backend::get_mode().

Here is the caller graph for this function:

◆ get_mount_type() [1/2]

AP_Mount::MountType AP_Mount::get_mount_type ( ) const
inline

Definition at line 85 of file AP_Mount.h.

Referenced by get_mount_type(), and init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_mount_type() [2/2]

AP_Mount::MountType AP_Mount::get_mount_type ( uint8_t  instance) const

Definition at line 501 of file AP_Mount.cpp.

◆ handle_gimbal_report()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_param_value()

void AP_Mount::handle_param_value ( mavlink_message_t *  msg)

Definition at line 627 of file AP_Mount.cpp.

Referenced by control_msg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_pan_control() [1/2]

bool AP_Mount::has_pan_control ( ) const
inline

Definition at line 89 of file AP_Mount.h.

Referenced by has_pan_control().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_pan_control() [2/2]

bool AP_Mount::has_pan_control ( uint8_t  instance) const

Definition at line 511 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ init()

void AP_Mount::init ( const AP_SerialManager serial_manager)

Definition at line 411 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ operator=()

AP_Mount& AP_Mount::operator= ( const AP_Mount )
delete

◆ send_gimbal_report()

void AP_Mount::send_gimbal_report ( mavlink_channel_t  chan)

Definition at line 637 of file AP_Mount.cpp.

Referenced by control_msg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_angle_targets() [1/2]

void AP_Mount::set_angle_targets ( float  roll,
float  tilt,
float  pan 
)
inline

Definition at line 107 of file AP_Mount.h.

Referenced by set_angle_targets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_angle_targets() [2/2]

void AP_Mount::set_angle_targets ( uint8_t  instance,
float  roll,
float  tilt,
float  pan 
)

Definition at line 552 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ set_mode() [1/2]

void AP_Mount::set_mode ( enum MAV_MOUNT_MODE  mode)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mode() [2/2]

void AP_Mount::set_mode ( uint8_t  instance,
enum MAV_MOUNT_MODE  mode 
)

Definition at line 540 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ set_mode_to_default() [1/2]

void AP_Mount::set_mode_to_default ( )
inline

Definition at line 103 of file AP_Mount.h.

Referenced by set_mode_to_default().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mode_to_default() [2/2]

void AP_Mount::set_mode_to_default ( uint8_t  instance)

Definition at line 534 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ set_roi_target() [1/2]

void AP_Mount::set_roi_target ( const struct Location target_loc)
inline

Definition at line 111 of file AP_Mount.h.

Referenced by set_roi_target().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_roi_target() [2/2]

void AP_Mount::set_roi_target ( uint8_t  instance,
const struct Location target_loc 
)

Definition at line 608 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ status_msg()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void AP_Mount::update ( void  )

Definition at line 479 of file AP_Mount.cpp.

Here is the call graph for this function:

◆ update_fast()

void AP_Mount::update_fast ( )

Definition at line 490 of file AP_Mount.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ AP_Mount_Alexmos

friend class AP_Mount_Alexmos
friend

Definition at line 53 of file AP_Mount.h.

Referenced by init().

◆ AP_Mount_Backend

friend class AP_Mount_Backend
friend

Definition at line 50 of file AP_Mount.h.

◆ AP_Mount_Servo

friend class AP_Mount_Servo
friend

Definition at line 51 of file AP_Mount.h.

Referenced by init().

◆ AP_Mount_SoloGimbal

friend class AP_Mount_SoloGimbal
friend

Definition at line 52 of file AP_Mount.h.

Referenced by init().

◆ AP_Mount_SToRM32

friend class AP_Mount_SToRM32
friend

Definition at line 54 of file AP_Mount.h.

Referenced by init().

◆ AP_Mount_SToRM32_serial

friend class AP_Mount_SToRM32_serial
friend

Definition at line 55 of file AP_Mount.h.

Referenced by init().

Member Data Documentation

◆ _ahrs

const AP_AHRS_TYPE& AP_Mount::_ahrs
protected

◆ _backends

AP_Mount_Backend* AP_Mount::_backends[AP_MOUNT_MAX_INSTANCES]
protected

◆ _current_loc

const struct Location& AP_Mount::_current_loc
protected

Definition at line 144 of file AP_Mount.h.

Referenced by AP_Mount_Backend::calc_angle_to_location().

◆ _joystick_speed

AP_Int8 AP_Mount::_joystick_speed
protected

Definition at line 147 of file AP_Mount.h.

Referenced by AP_Mount_Backend::update_targets_from_rc().

◆ _num_instances

uint8_t AP_Mount::_num_instances
protected

Definition at line 150 of file AP_Mount.h.

Referenced by init().

◆ _primary

uint8_t AP_Mount::_primary
protected

◆ state

struct AP_Mount::mount_state AP_Mount::state[AP_MOUNT_MAX_INSTANCES]
protected

◆ var_info

const AP_Param::GroupInfo AP_Mount::var_info
static

Definition at line 139 of file AP_Mount.h.

Referenced by AP_Mount().


The documentation for this class was generated from the following files: