mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Param: save flash space for parameter strings
now that we no longer need AVR support we can use nul terminated strings for parameter names, saving a couple of k of flash space
This commit is contained in:
parent
30ca9fbb01
commit
7d92202db9
@ -101,7 +101,7 @@ public:
|
|||||||
struct GroupInfo {
|
struct GroupInfo {
|
||||||
uint8_t type; // AP_PARAM_*
|
uint8_t type; // AP_PARAM_*
|
||||||
uint8_t idx; // identifier within the group
|
uint8_t idx; // identifier within the group
|
||||||
const char name[AP_MAX_NAME_SIZE+1];
|
const char *name;
|
||||||
ptrdiff_t offset; // offset within the object
|
ptrdiff_t offset; // offset within the object
|
||||||
union {
|
union {
|
||||||
const struct GroupInfo *group_info;
|
const struct GroupInfo *group_info;
|
||||||
@ -111,7 +111,7 @@ public:
|
|||||||
};
|
};
|
||||||
struct Info {
|
struct Info {
|
||||||
uint8_t type; // AP_PARAM_*
|
uint8_t type; // AP_PARAM_*
|
||||||
const char name[AP_MAX_NAME_SIZE+1];
|
const char *name;
|
||||||
uint16_t key; // k_param_*
|
uint16_t key; // k_param_*
|
||||||
const void *ptr; // pointer to the variable in memory
|
const void *ptr; // pointer to the variable in memory
|
||||||
union {
|
union {
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
uint16_t old_key; // k_param_*
|
uint16_t old_key; // k_param_*
|
||||||
uint8_t old_group_element; // index in old object
|
uint8_t old_group_element; // index in old object
|
||||||
enum ap_var_type type; // AP_PARAM_*
|
enum ap_var_type type; // AP_PARAM_*
|
||||||
const char new_name[AP_MAX_NAME_SIZE+1];
|
const char *new_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
// called once at startup to setup the _var_info[] table. This
|
// called once at startup to setup the _var_info[] table. This
|
||||||
|
Loading…
Reference in New Issue
Block a user