Browse Source

uncrustify libraries/AP_Common/AP_Param.h with fixups by hand

master
Pat Hickey 13 years ago
parent
commit
42e24a869f
  1. 63
      libraries/AP_Common/AP_Param.h

63
libraries/AP_Common/AP_Param.h

@ -96,7 +96,8 @@ public: @@ -96,7 +96,8 @@ public:
}
// empty constructor for child classes
AP_Param() {}
AP_Param() {
}
// a token used for first()/next() state
typedef struct {
@ -108,7 +109,8 @@ public: @@ -108,7 +109,8 @@ public:
// return true if AP_Param has been initialised via setup()
static bool initialised(void);
/// Copy the variable's name, prefixed by any containing group name, to a buffer.
/// Copy the variable's name, prefixed by any containing group name, to a
/// buffer.
///
/// If the variable has no name, the buffer will contain an empty string.
///
@ -199,16 +201,16 @@ private: @@ -199,16 +201,16 @@ private:
};
/* This header is prepended to a variable stored in EEPROM.
The meaning is as follows:
- key: the k_param enum value from Parameter.h in the sketch
- group_element: This is zero for top level parameters. For
parameters stored within an object this is divided
into 3 lots of 6 bits, allowing for three levels
of object to be stored in the eeprom
- type: the ap_var_type value for the variable
* The meaning is as follows:
*
* - key: the k_param enum value from Parameter.h in the sketch
*
* - group_element: This is zero for top level parameters. For
* parameters stored within an object this is divided
* into 3 lots of 6 bits, allowing for three levels
* of object to be stored in the eeprom
*
* - type: the ap_var_type value for the variable
*/
struct Param_header {
uint32_t key : 8;
@ -227,29 +229,48 @@ private: @@ -227,29 +229,48 @@ private:
static bool check_group_info(const struct GroupInfo *group_info, uint16_t *total_size, uint8_t max_bits);
static bool duplicate_key(uint8_t vindex, uint8_t key);
static bool check_var_info(void);
const struct Info *find_var_info_group(const struct GroupInfo *group_info,
const struct Info * find_var_info_group(
const struct GroupInfo * group_info,
uint8_t vindex,
uint8_t group_base,
uint8_t group_shift,
uint8_t * group_element,
const struct GroupInfo ** group_ret,
uint8_t * idx);
const struct Info *find_var_info(uint8_t *group_element,
const struct Info * find_var_info(
uint8_t * group_element,
const struct GroupInfo ** group_ret,
uint8_t * idx);
static const struct Info *find_by_header_group(struct Param_header phdr, void **ptr,
static const struct Info * find_by_header_group(
struct Param_header phdr, void **ptr,
uint8_t vindex,
const struct GroupInfo *group_info,
uint8_t group_base,
uint8_t group_shift);
static const struct Info *find_by_header(struct Param_header phdr, void **ptr);
void add_vector3f_suffix(char *buffer, size_t buffer_size, uint8_t idx);
static AP_Param *find_group(const char *name, uint8_t vindex, const struct GroupInfo *group_info, enum ap_var_type *ptype);
static const struct Info * find_by_header(
struct Param_header phdr,
void **ptr);
void add_vector3f_suffix(
char *buffer,
size_t buffer_size,
uint8_t idx);
static AP_Param * find_group(
const char *name,
uint8_t vindex,
const struct GroupInfo *group_info,
enum ap_var_type *ptype);
static void write_sentinal(uint16_t ofs);
bool scan(const struct Param_header *phdr, uint16_t *pofs);
bool scan(
const struct Param_header *phdr,
uint16_t *pofs);
static const uint8_t type_size(enum ap_var_type type);
static void eeprom_write_check(const void *ptr, uint16_t ofs, uint8_t size);
static AP_Param *next_group(uint8_t vindex, const struct GroupInfo *group_info,
static void eeprom_write_check(
const void *ptr,
uint16_t ofs,
uint8_t size);
static AP_Param * next_group(
uint8_t vindex,
const struct GroupInfo *group_info,
bool *found_current,
uint8_t group_base,
uint8_t group_shift,

Loading…
Cancel
Save