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

#include <AP_Arming.h>

Collaboration diagram for AP_Arming:
[legend]

Public Types

enum  ArmingChecks {
  ARMING_CHECK_NONE = 0x0000, ARMING_CHECK_ALL = 0x0001, ARMING_CHECK_BARO = 0x0002, ARMING_CHECK_COMPASS = 0x0004,
  ARMING_CHECK_GPS = 0x0008, ARMING_CHECK_INS = 0x0010, ARMING_CHECK_PARAMETERS = 0x0020, ARMING_CHECK_RC = 0x0040,
  ARMING_CHECK_VOLTAGE = 0x0080, ARMING_CHECK_BATTERY = 0x0100, ARMING_CHECK_AIRSPEED = 0x0200, ARMING_CHECK_LOGGING = 0x0400,
  ARMING_CHECK_SWITCH = 0x0800, ARMING_CHECK_GPS_CONFIG = 0x1000
}
 
enum  ArmingMethod { NONE = 0, RUDDER, MAVLINK }
 
enum  ArmingRequired { NO = 0, YES_MIN_PWM = 1, YES_ZERO_PWM = 2 }
 

Public Member Functions

ArmingRequired arming_required ()
 
virtual bool arm (uint8_t method)
 
bool disarm ()
 
bool is_armed ()
 
uint16_t get_enabled_checks ()
 
virtual bool pre_arm_checks (bool report)
 
bool arm_checks (uint8_t method)
 
uint16_t compass_magfield_expected () const
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Protected Member Functions

 AP_Arming (const AP_AHRS &ahrs_ref, Compass &compass, const AP_BattMonitor &battery)
 
virtual bool barometer_checks (bool report)
 
bool airspeed_checks (bool report)
 
bool logging_checks (bool report)
 
virtual bool ins_checks (bool report)
 
virtual bool compass_checks (bool report)
 
virtual bool gps_checks (bool report)
 
bool battery_checks (bool report)
 
bool hardware_safety_check (bool report)
 
virtual bool board_voltage_checks (bool report)
 
virtual bool rc_calibration_checks (bool report)
 
bool manual_transmitter_checks (bool report)
 
bool servo_checks (bool report) const
 
bool rc_checks_copter_sub (bool display_failure, const RC_Channel *channels[4], const bool check_min_max=true) const
 

Protected Attributes

AP_Int8 require
 
AP_Int16 checks_to_perform
 
AP_Float accel_error_threshold
 
AP_Float _min_voltage [AP_BATT_MONITOR_MAX_INSTANCES]
 
const AP_AHRSahrs
 
Compass_compass
 
const AP_BattMonitor_battery
 
bool armed:1
 
bool logging_available:1
 
uint8_t arming_method
 
uint32_t last_accel_pass_ms [INS_MAX_INSTANCES]
 
uint32_t last_gyro_pass_ms [INS_MAX_INSTANCES]
 

Detailed Description

Definition at line 10 of file AP_Arming.h.

Member Enumeration Documentation

◆ ArmingChecks

Enumerator
ARMING_CHECK_NONE 
ARMING_CHECK_ALL 
ARMING_CHECK_BARO 
ARMING_CHECK_COMPASS 
ARMING_CHECK_GPS 
ARMING_CHECK_INS 
ARMING_CHECK_PARAMETERS 
ARMING_CHECK_RC 
ARMING_CHECK_VOLTAGE 
ARMING_CHECK_BATTERY 
ARMING_CHECK_AIRSPEED 
ARMING_CHECK_LOGGING 
ARMING_CHECK_SWITCH 
ARMING_CHECK_GPS_CONFIG 

Definition at line 12 of file AP_Arming.h.

◆ ArmingMethod

Enumerator
NONE 
RUDDER 
MAVLINK 

Definition at line 29 of file AP_Arming.h.

◆ ArmingRequired

Enumerator
NO 
YES_MIN_PWM 
YES_ZERO_PWM 

Definition at line 35 of file AP_Arming.h.

Constructor & Destructor Documentation

◆ AP_Arming()

AP_Arming::AP_Arming ( const AP_AHRS ahrs_ref,
Compass compass,
const AP_BattMonitor battery 
)
protected

Definition at line 81 of file AP_Arming.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ airspeed_checks()

bool AP_Arming::airspeed_checks ( bool  report)
protected

Definition at line 130 of file AP_Arming.cpp.

Here is the call graph for this function:

◆ arm()

bool AP_Arming::arm ( uint8_t  method)
virtual

Definition at line 593 of file AP_Arming.cpp.

Here is the call graph for this function:

◆ arm_checks()

bool AP_Arming::arm_checks ( uint8_t  method)

Definition at line 568 of file AP_Arming.cpp.

Referenced by arm().

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

◆ arming_required()

AP_Arming::ArmingRequired AP_Arming::arming_required ( )

Definition at line 650 of file AP_Arming.cpp.

◆ barometer_checks()

bool AP_Arming::barometer_checks ( bool  report)
protectedvirtual

Definition at line 115 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ battery_checks()

bool AP_Arming::battery_checks ( bool  report)
protected

Definition at line 413 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ board_voltage_checks()

bool AP_Arming::board_voltage_checks ( bool  report)
protectedvirtual

Definition at line 530 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ compass_checks()

bool AP_Arming::compass_checks ( bool  report)
protectedvirtual

Definition at line 274 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ compass_magfield_expected()

uint16_t AP_Arming::compass_magfield_expected ( ) const

Definition at line 100 of file AP_Arming.cpp.

◆ disarm()

bool AP_Arming::disarm ( )

Definition at line 630 of file AP_Arming.cpp.

Here is the call graph for this function:

◆ get_enabled_checks()

uint16_t AP_Arming::get_enabled_checks ( )

Definition at line 110 of file AP_Arming.cpp.

◆ gps_checks()

bool AP_Arming::gps_checks ( bool  report)
protectedvirtual

Definition at line 344 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ hardware_safety_check()

bool AP_Arming::hardware_safety_check ( bool  report)
protected

Definition at line 440 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ ins_checks()

bool AP_Arming::ins_checks ( bool  report)
protectedvirtual

Definition at line 172 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ is_armed()

bool AP_Arming::is_armed ( )

Definition at line 105 of file AP_Arming.cpp.

◆ logging_checks()

bool AP_Arming::logging_checks ( bool  report)
protected

Definition at line 152 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ manual_transmitter_checks()

bool AP_Arming::manual_transmitter_checks ( bool  report)
protected

Definition at line 483 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

◆ pre_arm_checks()

bool AP_Arming::pre_arm_checks ( bool  report)
virtual

Definition at line 546 of file AP_Arming.cpp.

Referenced by arm().

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

◆ rc_calibration_checks()

bool AP_Arming::rc_calibration_checks ( bool  report)
protectedvirtual

Definition at line 457 of file AP_Arming.cpp.

Referenced by manual_transmitter_checks().

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

◆ rc_checks_copter_sub()

bool AP_Arming::rc_checks_copter_sub ( bool  display_failure,
const RC_Channel channels[4],
const bool  check_min_max = true 
) const
protected

Definition at line 657 of file AP_Arming.cpp.

Here is the call graph for this function:

◆ servo_checks()

bool AP_Arming::servo_checks ( bool  report) const
protected

Definition at line 503 of file AP_Arming.cpp.

Referenced by pre_arm_checks().

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

Member Data Documentation

◆ _battery

const AP_BattMonitor& AP_Arming::_battery
protected

Definition at line 76 of file AP_Arming.h.

Referenced by battery_checks().

◆ _compass

Compass& AP_Arming::_compass
protected

Definition at line 75 of file AP_Arming.h.

Referenced by compass_checks().

◆ _min_voltage

AP_Float AP_Arming::_min_voltage[AP_BATT_MONITOR_MAX_INSTANCES]
protected

Definition at line 71 of file AP_Arming.h.

Referenced by battery_checks().

◆ accel_error_threshold

AP_Float AP_Arming::accel_error_threshold
protected

Definition at line 70 of file AP_Arming.h.

Referenced by ins_checks().

◆ ahrs

const AP_AHRS& AP_Arming::ahrs
protected

Definition at line 74 of file AP_Arming.h.

Referenced by airspeed_checks(), and gps_checks().

◆ armed

bool AP_Arming::armed
protected

Definition at line 79 of file AP_Arming.h.

Referenced by arm(), disarm(), is_armed(), and pre_arm_checks().

◆ arming_method

uint8_t AP_Arming::arming_method
protected

Definition at line 81 of file AP_Arming.h.

Referenced by arm().

◆ checks_to_perform

AP_Int16 AP_Arming::checks_to_perform
protected

◆ last_accel_pass_ms

uint32_t AP_Arming::last_accel_pass_ms[INS_MAX_INSTANCES]
protected

Definition at line 82 of file AP_Arming.h.

Referenced by AP_Arming(), and ins_checks().

◆ last_gyro_pass_ms

uint32_t AP_Arming::last_gyro_pass_ms[INS_MAX_INSTANCES]
protected

Definition at line 83 of file AP_Arming.h.

Referenced by AP_Arming(), and ins_checks().

◆ logging_available

bool AP_Arming::logging_available
protected

Definition at line 80 of file AP_Arming.h.

◆ require

AP_Int8 AP_Arming::require
protected

Definition at line 68 of file AP_Arming.h.

Referenced by AP_Arming(), arming_required(), is_armed(), and pre_arm_checks().

◆ var_info

const AP_Param::GroupInfo AP_Arming::var_info
static

Definition at line 61 of file AP_Arming.h.

Referenced by AP_Arming().


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