APM:Libraries
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
AP_Tuning Class Referenceabstract

#include <AP_Tuning.h>

Collaboration diagram for AP_Tuning:
[legend]

Classes

struct  tuning_name
 
struct  tuning_set
 

Public Member Functions

 AP_Tuning (const struct tuning_set *sets, const struct tuning_name *names)
 
void check_input (uint8_t flightmode)
 

Public Attributes

const uint8_t set_base = 100
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Protected Member Functions

virtual AP_Float * get_param_pointer (uint8_t parm)=0
 
virtual void save_value (uint8_t parm)=0
 
virtual void reload_value (uint8_t parm)=0
 
virtual void set_value (uint8_t parm, float value)=0
 
virtual float controller_error (uint8_t parm)=0
 

Protected Attributes

AP_Int16 parmset
 

Private Member Functions

void Log_Write_Parameter_Tuning (float value)
 
void check_selector_switch (void)
 
void re_center (void)
 
void next_parameter (void)
 
void save_parameters (void)
 
void revert_parameters (void)
 
const char * get_tuning_name (uint8_t parm)
 
void check_controller_error (void)
 

Private Attributes

AP_Int8 channel
 
AP_Int16 channel_min
 
AP_Int16 channel_max
 
AP_Int8 selector
 
AP_Float range
 
AP_Int8 mode_revert
 
AP_Float error_threshold
 
uint32_t selector_start_ms
 
bool mid_point_wait
 
float last_channel_value
 
float center_value
 
uint32_t last_check_ms
 
uint8_t current_parm
 
uint8_t current_parm_index
 
uint8_t current_set
 
bool changed:1
 
uint32_t need_revert
 
uint8_t last_flightmode
 
uint32_t last_controller_error_ms
 
const tuning_settuning_sets
 
const tuning_nametuning_names
 

Detailed Description

Definition at line 10 of file AP_Tuning.h.

Constructor & Destructor Documentation

◆ AP_Tuning()

AP_Tuning::AP_Tuning ( const struct tuning_set sets,
const struct tuning_name names 
)
inline

Definition at line 25 of file AP_Tuning.h.

Here is the call graph for this function:

Member Function Documentation

◆ check_controller_error()

void AP_Tuning::check_controller_error ( void  )
private

Definition at line 328 of file AP_Tuning.cpp.

Referenced by check_input().

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

◆ check_input()

void AP_Tuning::check_input ( uint8_t  flightmode)

Definition at line 120 of file AP_Tuning.cpp.

Here is the call graph for this function:

◆ check_selector_switch()

void AP_Tuning::check_selector_switch ( void  )
private

Definition at line 62 of file AP_Tuning.cpp.

Referenced by check_input().

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

◆ controller_error()

virtual float AP_Tuning::controller_error ( uint8_t  parm)
protectedpure virtual

Referenced by check_controller_error().

Here is the caller graph for this function:

◆ get_param_pointer()

virtual AP_Float* AP_Tuning::get_param_pointer ( uint8_t  parm)
protectedpure virtual

Referenced by re_center().

Here is the caller graph for this function:

◆ get_tuning_name()

const char * AP_Tuning::get_tuning_name ( uint8_t  parm)
private

Definition at line 315 of file AP_Tuning.cpp.

Referenced by check_input(), check_selector_switch(), and next_parameter().

Here is the caller graph for this function:

◆ Log_Write_Parameter_Tuning()

void AP_Tuning::Log_Write_Parameter_Tuning ( float  value)
private

Definition at line 227 of file AP_Tuning.cpp.

Referenced by check_input().

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

◆ next_parameter()

void AP_Tuning::next_parameter ( void  )
private

Definition at line 287 of file AP_Tuning.cpp.

Referenced by check_input(), and check_selector_switch().

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

◆ re_center()

void AP_Tuning::re_center ( void  )
private

Definition at line 108 of file AP_Tuning.cpp.

Referenced by check_input(), check_selector_switch(), and next_parameter().

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

◆ reload_value()

virtual void AP_Tuning::reload_value ( uint8_t  parm)
protectedpure virtual

Referenced by revert_parameters().

Here is the caller graph for this function:

◆ revert_parameters()

void AP_Tuning::revert_parameters ( void  )
private

Definition at line 263 of file AP_Tuning.cpp.

Referenced by check_input().

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

◆ save_parameters()

void AP_Tuning::save_parameters ( void  )
private

Definition at line 240 of file AP_Tuning.cpp.

Referenced by check_selector_switch().

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

◆ save_value()

virtual void AP_Tuning::save_value ( uint8_t  parm)
protectedpure virtual

Referenced by save_parameters().

Here is the caller graph for this function:

◆ set_value()

virtual void AP_Tuning::set_value ( uint8_t  parm,
float  value 
)
protectedpure virtual

Referenced by check_input().

Here is the caller graph for this function:

Member Data Documentation

◆ center_value

float AP_Tuning::center_value
private

Definition at line 59 of file AP_Tuning.h.

Referenced by check_input(), Log_Write_Parameter_Tuning(), and re_center().

◆ changed

bool AP_Tuning::changed
private

Definition at line 75 of file AP_Tuning.h.

Referenced by check_input(), and check_selector_switch().

◆ channel

AP_Int8 AP_Tuning::channel
private

Definition at line 41 of file AP_Tuning.h.

Referenced by check_input().

◆ channel_max

AP_Int16 AP_Tuning::channel_max
private

Definition at line 43 of file AP_Tuning.h.

Referenced by check_input().

◆ channel_min

AP_Int16 AP_Tuning::channel_min
private

Definition at line 42 of file AP_Tuning.h.

Referenced by check_input().

◆ current_parm

uint8_t AP_Tuning::current_parm
private

◆ current_parm_index

uint8_t AP_Tuning::current_parm_index
private

Definition at line 69 of file AP_Tuning.h.

Referenced by check_input(), and next_parameter().

◆ current_set

uint8_t AP_Tuning::current_set
private

Definition at line 72 of file AP_Tuning.h.

Referenced by check_input().

◆ error_threshold

AP_Float AP_Tuning::error_threshold
private

Definition at line 47 of file AP_Tuning.h.

Referenced by check_controller_error().

◆ last_channel_value

float AP_Tuning::last_channel_value
private

Definition at line 56 of file AP_Tuning.h.

Referenced by check_input().

◆ last_check_ms

uint32_t AP_Tuning::last_check_ms
private

Definition at line 61 of file AP_Tuning.h.

Referenced by check_input().

◆ last_controller_error_ms

uint32_t AP_Tuning::last_controller_error_ms
private

Definition at line 84 of file AP_Tuning.h.

Referenced by check_controller_error().

◆ last_flightmode

uint8_t AP_Tuning::last_flightmode
private

Definition at line 81 of file AP_Tuning.h.

Referenced by check_input().

◆ mid_point_wait

bool AP_Tuning::mid_point_wait
private

Definition at line 53 of file AP_Tuning.h.

Referenced by check_input(), and re_center().

◆ mode_revert

AP_Int8 AP_Tuning::mode_revert
private

Definition at line 46 of file AP_Tuning.h.

Referenced by check_input().

◆ need_revert

uint32_t AP_Tuning::need_revert
private

Definition at line 78 of file AP_Tuning.h.

Referenced by check_input(), check_selector_switch(), and revert_parameters().

◆ parmset

AP_Int16 AP_Tuning::parmset
protected

◆ range

AP_Float AP_Tuning::range
private

Definition at line 45 of file AP_Tuning.h.

◆ selector

AP_Int8 AP_Tuning::selector
private

Definition at line 44 of file AP_Tuning.h.

Referenced by check_selector_switch().

◆ selector_start_ms

uint32_t AP_Tuning::selector_start_ms
private

Definition at line 50 of file AP_Tuning.h.

Referenced by check_input(), and check_selector_switch().

◆ set_base

const uint8_t AP_Tuning::set_base = 100

Definition at line 38 of file AP_Tuning.h.

Referenced by next_parameter(), revert_parameters(), and save_parameters().

◆ tuning_names

const tuning_name* AP_Tuning::tuning_names
private

Definition at line 87 of file AP_Tuning.h.

Referenced by get_tuning_name().

◆ tuning_sets

const tuning_set* AP_Tuning::tuning_sets
private

Definition at line 86 of file AP_Tuning.h.

Referenced by next_parameter(), revert_parameters(), and save_parameters().

◆ var_info

const AP_Param::GroupInfo AP_Tuning::var_info
static

Definition at line 32 of file AP_Tuning.h.

Referenced by AP_Tuning().


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