APM:Libraries
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AP_Mount_Alexmos Class Reference

#include <AP_Mount_Alexmos.h>

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

Classes

struct  alexmos_angles
 
struct  alexmos_angles_speed
 
union  alexmos_parameters
 
struct  alexmos_params
 
struct  alexmos_version
 

Public Member Functions

 AP_Mount_Alexmos (AP_Mount &frontend, AP_Mount::mount_state &state, uint8_t instance)
 
virtual void init (const AP_SerialManager &serial_manager)
 
virtual void update ()
 
virtual bool has_pan_control () const
 
virtual void set_mode (enum MAV_MOUNT_MODE mode)
 
virtual void status_msg (mavlink_channel_t chan)
 
- Public Member Functions inherited from AP_Mount_Backend
 AP_Mount_Backend (AP_Mount &frontend, AP_Mount::mount_state &state, uint8_t instance)
 
virtual ~AP_Mount_Backend (void)
 
virtual void update_fast ()
 
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 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)
 

Private Member Functions

void get_angles ()
 
void set_motor (bool on)
 
void get_boardinfo ()
 
void control_axis (const Vector3f &angle, bool targets_in_degrees)
 
void read_params (uint8_t profile_id)
 
void write_params ()
 
bool get_realtimedata (Vector3f &angle)
 
void send_command (uint8_t cmd, uint8_t *data, uint8_t size)
 
void parse_body ()
 
void read_incoming ()
 

Private Attributes

union PACKED AP_Mount_Alexmos::alexmos_parameters _buffer
 
union PACKED AP_Mount_Alexmos::alexmos_parameters _current_parameters
 
AP_HAL::UARTDriver_port
 
bool _initialised: 1
 
uint8_t _board_version
 
float _current_firmware_version
 
uint8_t _firmware_beta_version
 
bool _gimbal_3axis: 1
 
bool _gimbal_bat_monitoring: 1
 
Vector3f _current_angle
 
bool _param_read_once: 1
 
uint8_t _checksum
 
uint8_t _step
 
uint8_t _command_id
 
uint8_t _payload_length
 
uint8_t _payload_counter
 
bool _last_command_confirmed: 1
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Mount_Backend
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 inherited from AP_Mount_Backend
AP_Mount_frontend
 
AP_Mount::mount_state_state
 
uint8_t _instance
 
Vector3f _angle_ef_target_rad
 

Detailed Description

Definition at line 65 of file AP_Mount_Alexmos.h.

Constructor & Destructor Documentation

◆ AP_Mount_Alexmos()

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

Definition at line 69 of file AP_Mount_Alexmos.h.

Here is the call graph for this function:

Member Function Documentation

◆ control_axis()

void AP_Mount_Alexmos::control_axis ( const Vector3f angle,
bool  targets_in_degrees 
)
private

Definition at line 125 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and update().

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

◆ get_angles()

void AP_Mount_Alexmos::get_angles ( )
private

Definition at line 90 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and status_msg().

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

◆ get_boardinfo()

void AP_Mount_Alexmos::get_boardinfo ( )
private

Definition at line 113 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and init().

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

◆ get_realtimedata()

bool AP_Mount_Alexmos::get_realtimedata ( Vector3f angle)
private

Referenced by AP_Mount_Alexmos().

Here is the caller graph for this function:

◆ has_pan_control()

bool AP_Mount_Alexmos::has_pan_control ( ) const
virtual

Implements AP_Mount_Backend.

Definition at line 64 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

Here is the caller graph for this function:

◆ init()

void AP_Mount_Alexmos::init ( const AP_SerialManager serial_manager)
virtual

Implements AP_Mount_Backend.

Definition at line 5 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

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

◆ parse_body()

void AP_Mount_Alexmos::parse_body ( )
private

Definition at line 187 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and read_incoming().

Here is the caller graph for this function:

◆ read_incoming()

void AP_Mount_Alexmos::read_incoming ( )
private

Definition at line 221 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and update().

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

◆ read_params()

void AP_Mount_Alexmos::read_params ( uint8_t  profile_id)
private

Definition at line 146 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), and init().

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

◆ send_command()

void AP_Mount_Alexmos::send_command ( uint8_t  cmd,
uint8_t *  data,
uint8_t  size 
)
private

Definition at line 166 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos(), control_axis(), get_angles(), get_boardinfo(), read_params(), set_motor(), and write_params().

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

◆ set_mode()

void AP_Mount_Alexmos::set_mode ( enum MAV_MOUNT_MODE  mode)
virtual

Implements AP_Mount_Backend.

Definition at line 70 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

Here is the caller graph for this function:

◆ set_motor()

void AP_Mount_Alexmos::set_motor ( bool  on)
private

Definition at line 99 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

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

◆ status_msg()

void AP_Mount_Alexmos::status_msg ( mavlink_channel_t  chan)
virtual

Reimplemented from AP_Mount_Backend.

Definition at line 77 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

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

◆ update()

void AP_Mount_Alexmos::update ( void  )
virtual

Implements AP_Mount_Backend.

Definition at line 16 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

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

◆ write_params()

void AP_Mount_Alexmos::write_params ( )
private

Definition at line 155 of file AP_Mount_Alexmos.cpp.

Referenced by AP_Mount_Alexmos().

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

Member Data Documentation

◆ _board_version

uint8_t AP_Mount_Alexmos::_board_version
private

Definition at line 296 of file AP_Mount_Alexmos.h.

Referenced by get_boardinfo(), and parse_body().

◆ _buffer

union PACKED AP_Mount_Alexmos::alexmos_parameters AP_Mount_Alexmos::_buffer
private

Referenced by parse_body(), and read_incoming().

◆ _checksum

uint8_t AP_Mount_Alexmos::_checksum
private

Definition at line 309 of file AP_Mount_Alexmos.h.

Referenced by read_incoming().

◆ _command_id

uint8_t AP_Mount_Alexmos::_command_id
private

Definition at line 311 of file AP_Mount_Alexmos.h.

Referenced by parse_body(), and read_incoming().

◆ _current_angle

Vector3f AP_Mount_Alexmos::_current_angle
private

Definition at line 303 of file AP_Mount_Alexmos.h.

Referenced by parse_body(), and status_msg().

◆ _current_firmware_version

float AP_Mount_Alexmos::_current_firmware_version
private

Definition at line 297 of file AP_Mount_Alexmos.h.

Referenced by parse_body().

◆ _current_parameters

union PACKED AP_Mount_Alexmos::alexmos_parameters AP_Mount_Alexmos::_current_parameters
private

Referenced by parse_body(), and write_params().

◆ _firmware_beta_version

uint8_t AP_Mount_Alexmos::_firmware_beta_version
private

Definition at line 298 of file AP_Mount_Alexmos.h.

Referenced by parse_body().

◆ _gimbal_3axis

bool AP_Mount_Alexmos::_gimbal_3axis
private

Definition at line 299 of file AP_Mount_Alexmos.h.

Referenced by has_pan_control(), and parse_body().

◆ _gimbal_bat_monitoring

bool AP_Mount_Alexmos::_gimbal_bat_monitoring
private

Definition at line 300 of file AP_Mount_Alexmos.h.

Referenced by parse_body().

◆ _initialised

bool AP_Mount_Alexmos::_initialised
private

Definition at line 293 of file AP_Mount_Alexmos.h.

Referenced by init(), status_msg(), and update().

◆ _last_command_confirmed

bool AP_Mount_Alexmos::_last_command_confirmed
private

Definition at line 316 of file AP_Mount_Alexmos.h.

Referenced by parse_body(), and read_incoming().

◆ _param_read_once

bool AP_Mount_Alexmos::_param_read_once
private

Definition at line 306 of file AP_Mount_Alexmos.h.

Referenced by parse_body(), and write_params().

◆ _payload_counter

uint8_t AP_Mount_Alexmos::_payload_counter
private

Definition at line 313 of file AP_Mount_Alexmos.h.

Referenced by read_incoming().

◆ _payload_length

uint8_t AP_Mount_Alexmos::_payload_length
private

Definition at line 312 of file AP_Mount_Alexmos.h.

Referenced by read_incoming().

◆ _port

AP_HAL::UARTDriver* AP_Mount_Alexmos::_port
private

Definition at line 292 of file AP_Mount_Alexmos.h.

Referenced by init(), read_incoming(), and send_command().

◆ _step

uint8_t AP_Mount_Alexmos::_step
private

Definition at line 310 of file AP_Mount_Alexmos.h.

Referenced by read_incoming().


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