APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AP_Mount_Backend Class Referenceabstract

#include <AP_Mount_Backend.h>

Inheritance diagram for AP_Mount_Backend:
[legend]
Collaboration diagram for AP_Mount_Backend:
[legend]

Public Member Functions

 AP_Mount_Backend (AP_Mount &frontend, AP_Mount::mount_state &state, uint8_t instance)
 
virtual ~AP_Mount_Backend (void)
 
virtual void init (const AP_SerialManager &serial_manager)=0
 
virtual void update ()=0
 
virtual void update_fast ()
 
virtual bool has_pan_control () const =0
 
virtual void set_mode (enum MAV_MOUNT_MODE mode)=0
 
virtual void set_angle_targets (float roll, float tilt, float pan)
 
virtual void set_roi_target (const struct Location &target_loc)
 
virtual void control (int32_t pitch_or_lat, int32_t roll_or_lon, int32_t yaw_or_alt, MAV_MOUNT_MODE mount_mode)
 
virtual void configure_msg (mavlink_message_t *msg)
 
virtual void control_msg (mavlink_message_t *msg)
 
virtual void status_msg (mavlink_channel_t chan)
 
virtual void handle_gimbal_report (mavlink_channel_t chan, mavlink_message_t *msg)
 
virtual void handle_param_value (mavlink_message_t *msg)
 
virtual void send_gimbal_report (mavlink_channel_t chan)
 

Protected Member Functions

void update_targets_from_rc ()
 
int32_t angle_input (RC_Channel *rc, int16_t angle_min, int16_t angle_max)
 
float angle_input_rad (RC_Channel *rc, int16_t angle_min, int16_t angle_max)
 
void calc_angle_to_location (const struct Location &target, Vector3f &angles_to_target_rad, bool calc_tilt, bool calc_pan, bool relative_pan=true)
 
MAV_MOUNT_MODE get_mode (void) const
 

Protected Attributes

AP_Mount_frontend
 
AP_Mount::mount_state_state
 
uint8_t _instance
 
Vector3f _angle_ef_target_rad
 

Detailed Description

Definition at line 25 of file AP_Mount_Backend.h.

Constructor & Destructor Documentation

◆ AP_Mount_Backend()

AP_Mount_Backend::AP_Mount_Backend ( AP_Mount frontend,
AP_Mount::mount_state state,
uint8_t  instance 
)
inline

Definition at line 29 of file AP_Mount_Backend.h.

◆ ~AP_Mount_Backend()

virtual AP_Mount_Backend::~AP_Mount_Backend ( void  )
inlinevirtual

Definition at line 36 of file AP_Mount_Backend.h.

Here is the call graph for this function:

Member Function Documentation

◆ angle_input()

int32_t AP_Mount_Backend::angle_input ( RC_Channel rc,
int16_t  angle_min,
int16_t  angle_max 
)
protected

Definition at line 122 of file AP_Mount_Backend.cpp.

Referenced by angle_input_rad(), and send_gimbal_report().

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

◆ angle_input_rad()

float AP_Mount_Backend::angle_input_rad ( RC_Channel rc,
int16_t  angle_min,
int16_t  angle_max 
)
protected

Definition at line 129 of file AP_Mount_Backend.cpp.

Referenced by send_gimbal_report(), and update_targets_from_rc().

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

◆ calc_angle_to_location()

void AP_Mount_Backend::calc_angle_to_location ( const struct Location target,
Vector3f angles_to_target_rad,
bool  calc_tilt,
bool  calc_pan,
bool  relative_pan = true 
)
protected

Definition at line 135 of file AP_Mount_Backend.cpp.

Referenced by send_gimbal_report(), AP_Mount_SToRM32_serial::update(), AP_Mount_SToRM32::update(), AP_Mount_Servo::update(), and AP_Mount_Alexmos::update().

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

◆ configure_msg()

void AP_Mount_Backend::configure_msg ( mavlink_message_t *  msg)
virtual

Definition at line 28 of file AP_Mount_Backend.cpp.

Referenced by AP_Mount::configure_msg(), and update_fast().

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

◆ control()

void AP_Mount_Backend::control ( int32_t  pitch_or_lat,
int32_t  roll_or_lon,
int32_t  yaw_or_alt,
MAV_MOUNT_MODE  mount_mode 
)
virtual

Definition at line 45 of file AP_Mount_Backend.cpp.

Referenced by AP_Mount::control(), control_msg(), and update_fast().

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

◆ control_msg()

void AP_Mount_Backend::control_msg ( mavlink_message_t *  msg)
virtual

Definition at line 37 of file AP_Mount_Backend.cpp.

Referenced by AP_Mount::control_msg(), and update_fast().

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

◆ get_mode()

MAV_MOUNT_MODE AP_Mount_Backend::get_mode ( void  ) const
inlineprotected

Definition at line 93 of file AP_Mount_Backend.h.

Referenced by AP_Mount_SToRM32_serial::update(), AP_Mount_SToRM32::update(), AP_Mount_Servo::update(), and AP_Mount_Alexmos::update().

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

◆ handle_gimbal_report()

virtual void AP_Mount_Backend::handle_gimbal_report ( mavlink_channel_t  chan,
mavlink_message_t *  msg 
)
inlinevirtual

Definition at line 72 of file AP_Mount_Backend.h.

Referenced by AP_Mount::handle_gimbal_report().

Here is the caller graph for this function:

◆ handle_param_value()

virtual void AP_Mount_Backend::handle_param_value ( mavlink_message_t *  msg)
inlinevirtual

Definition at line 75 of file AP_Mount_Backend.h.

Referenced by AP_Mount::handle_param_value().

Here is the caller graph for this function:

◆ has_pan_control()

virtual bool AP_Mount_Backend::has_pan_control ( ) const
pure virtual

Implemented in AP_Mount_Alexmos, AP_Mount_Servo, AP_Mount_SToRM32, and AP_Mount_SToRM32_serial.

Referenced by AP_Mount::has_pan_control(), and update_fast().

Here is the caller graph for this function:

◆ init()

virtual void AP_Mount_Backend::init ( const AP_SerialManager serial_manager)
pure virtual

Implemented in AP_Mount_Alexmos, AP_Mount_Servo, AP_Mount_SToRM32, and AP_Mount_SToRM32_serial.

Referenced by AP_Mount::init(), and ~AP_Mount_Backend().

Here is the caller graph for this function:

◆ send_gimbal_report()

virtual void AP_Mount_Backend::send_gimbal_report ( mavlink_channel_t  chan)
inlinevirtual

Definition at line 78 of file AP_Mount_Backend.h.

Referenced by AP_Mount::send_gimbal_report().

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

◆ set_angle_targets()

void AP_Mount_Backend::set_angle_targets ( float  roll,
float  tilt,
float  pan 
)
virtual

Definition at line 6 of file AP_Mount_Backend.cpp.

Referenced by control(), AP_Mount::set_angle_targets(), and update_fast().

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

◆ set_mode()

virtual void AP_Mount_Backend::set_mode ( enum MAV_MOUNT_MODE  mode)
pure virtual

Implemented in AP_Mount_Alexmos, AP_Mount_Servo, AP_Mount_SToRM32, and AP_Mount_SToRM32_serial.

Referenced by configure_msg(), AP_Mount::set_mode(), and update_fast().

Here is the caller graph for this function:

◆ set_roi_target()

void AP_Mount_Backend::set_roi_target ( const struct Location target_loc)
virtual

Definition at line 18 of file AP_Mount_Backend.cpp.

Referenced by control(), AP_Mount::set_roi_target(), and update_fast().

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

◆ status_msg()

virtual void AP_Mount_Backend::status_msg ( mavlink_channel_t  chan)
inlinevirtual

Reimplemented in AP_Mount_Alexmos, AP_Mount_Servo, AP_Mount_SToRM32, and AP_Mount_SToRM32_serial.

Definition at line 69 of file AP_Mount_Backend.h.

Referenced by AP_Mount::status_msg().

Here is the caller graph for this function:

◆ update()

virtual void AP_Mount_Backend::update ( )
pure virtual

Implemented in AP_Mount_Alexmos, AP_Mount_Servo, AP_Mount_SToRM32, and AP_Mount_SToRM32_serial.

Referenced by AP_Mount::update(), and ~AP_Mount_Backend().

Here is the caller graph for this function:

◆ update_fast()

virtual void AP_Mount_Backend::update_fast ( )
inlinevirtual

Definition at line 45 of file AP_Mount_Backend.h.

Referenced by AP_Mount::update_fast().

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

◆ update_targets_from_rc()

void AP_Mount_Backend::update_targets_from_rc ( )
protected

Definition at line 84 of file AP_Mount_Backend.cpp.

Referenced by send_gimbal_report(), AP_Mount_SToRM32_serial::update(), AP_Mount_SToRM32::update(), AP_Mount_Servo::update(), and AP_Mount_Alexmos::update().

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

Member Data Documentation

◆ _angle_ef_target_rad

Vector3f AP_Mount_Backend::_angle_ef_target_rad
protected

◆ _frontend

AP_Mount& AP_Mount_Backend::_frontend
protected

◆ _instance

uint8_t AP_Mount_Backend::_instance
protected

◆ _state

AP_Mount::mount_state& AP_Mount_Backend::_state
protected

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