APM:Libraries
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
Compass_PerMotor Class Reference

#include <Compass_PerMotor.h>

Collaboration diagram for Compass_PerMotor:
[legend]

Public Member Functions

 Compass_PerMotor (Compass &_compass)
 
bool enabled (void) const
 
void set_voltage (float _voltage)
 
void calibration_start (void)
 
void calibration_update (void)
 
void calibration_end (void)
 
void compensate (Vector3f &offset)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Member Functions

float scaled_output (uint8_t motor)
 

Private Attributes

Compasscompass
 
AP_Int8 enable
 
AP_Float expo
 
AP_Vector3f compensation [4]
 
Vector3f base_field
 
Vector3f field_sum [4]
 
float output_sum [4]
 
uint16_t count [4]
 
uint32_t start_ms [4]
 
float voltage
 
bool running
 
bool have_motor_map
 
uint8_t motor_map [4]
 

Detailed Description

Definition at line 12 of file Compass_PerMotor.h.

Constructor & Destructor Documentation

◆ Compass_PerMotor()

Compass_PerMotor::Compass_PerMotor ( Compass _compass)

Definition at line 94 of file Compass_PerMotor.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ calibration_end()

void Compass_PerMotor::calibration_end ( void  )

Definition at line 185 of file Compass_PerMotor.cpp.

Referenced by Compass::per_motor_calibration_end(), and set_voltage().

Here is the caller graph for this function:

◆ calibration_start()

void Compass_PerMotor::calibration_start ( void  )

Definition at line 134 of file Compass_PerMotor.cpp.

Referenced by Compass::per_motor_calibration_start(), and set_voltage().

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

◆ calibration_update()

void Compass_PerMotor::calibration_update ( void  )

Definition at line 156 of file Compass_PerMotor.cpp.

Referenced by Compass::per_motor_calibration_update(), and set_voltage().

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

◆ compensate()

void Compass_PerMotor::compensate ( Vector3f offset)

Definition at line 214 of file Compass_PerMotor.cpp.

Referenced by AP_Compass_Backend::correct_field(), and set_voltage().

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

◆ enabled()

bool Compass_PerMotor::enabled ( void  ) const
inline

Definition at line 18 of file Compass_PerMotor.h.

Referenced by AP_Compass_Backend::correct_field().

Here is the caller graph for this function:

◆ scaled_output()

float Compass_PerMotor::scaled_output ( uint8_t  motor)
private

Definition at line 101 of file Compass_PerMotor.cpp.

Referenced by calibration_update(), and compensate().

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

◆ set_voltage()

void Compass_PerMotor::set_voltage ( float  _voltage)
inline

Definition at line 22 of file Compass_PerMotor.h.

Referenced by Compass::set_voltage().

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

Member Data Documentation

◆ base_field

Vector3f Compass_PerMotor::base_field
private

Definition at line 39 of file Compass_PerMotor.h.

Referenced by calibration_end(), and calibration_start().

◆ compass

Compass& Compass_PerMotor::compass
private

Definition at line 33 of file Compass_PerMotor.h.

Referenced by calibration_start(), and calibration_update().

◆ compensation

AP_Vector3f Compass_PerMotor::compensation[4]
private

Definition at line 36 of file Compass_PerMotor.h.

Referenced by calibration_end(), and compensate().

◆ count

uint16_t Compass_PerMotor::count[4]
private

Definition at line 48 of file Compass_PerMotor.h.

Referenced by calibration_end(), calibration_start(), and calibration_update().

◆ enable

AP_Int8 Compass_PerMotor::enable
private

Definition at line 34 of file Compass_PerMotor.h.

Referenced by calibration_end(), and enabled().

◆ expo

AP_Float Compass_PerMotor::expo
private

Definition at line 35 of file Compass_PerMotor.h.

Referenced by scaled_output().

◆ field_sum

Vector3f Compass_PerMotor::field_sum[4]
private

Definition at line 42 of file Compass_PerMotor.h.

Referenced by calibration_end(), calibration_start(), and calibration_update().

◆ have_motor_map

bool Compass_PerMotor::have_motor_map
private

Definition at line 63 of file Compass_PerMotor.h.

Referenced by scaled_output().

◆ motor_map

uint8_t Compass_PerMotor::motor_map[4]
private

Definition at line 64 of file Compass_PerMotor.h.

Referenced by scaled_output().

◆ output_sum

float Compass_PerMotor::output_sum[4]
private

Definition at line 45 of file Compass_PerMotor.h.

Referenced by calibration_end(), calibration_start(), and calibration_update().

◆ running

bool Compass_PerMotor::running
private

Definition at line 57 of file Compass_PerMotor.h.

Referenced by calibration_end(), calibration_start(), and compensate().

◆ start_ms

uint32_t Compass_PerMotor::start_ms[4]
private

Definition at line 51 of file Compass_PerMotor.h.

Referenced by calibration_start(), and calibration_update().

◆ var_info

const AP_Param::GroupInfo Compass_PerMotor::var_info
static

Definition at line 14 of file Compass_PerMotor.h.

Referenced by Compass_PerMotor().

◆ voltage

float Compass_PerMotor::voltage
private

Definition at line 54 of file Compass_PerMotor.h.

Referenced by scaled_output(), and set_voltage().


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