AP_Param: remove CLI

This commit is contained in:
Peter Barker 2017-08-12 09:15:19 +10:00 committed by Randy Mackay
parent 90948bef05
commit e3599ab4f9
2 changed files with 0 additions and 65 deletions

View File

@ -1575,56 +1575,6 @@ float AP_Param::cast_to_float(enum ap_var_type type) const
}
}
// print the value of all variables
void AP_Param::show(const AP_Param *ap, const char *s,
enum ap_var_type type, AP_HAL::BetterStream *port)
{
switch (type) {
case AP_PARAM_INT8:
port->printf("%s: %d\n", s, (int)((AP_Int8 *)ap)->get());
break;
case AP_PARAM_INT16:
port->printf("%s: %d\n", s, (int)((AP_Int16 *)ap)->get());
break;
case AP_PARAM_INT32:
port->printf("%s: %ld\n", s, (long)((AP_Int32 *)ap)->get());
break;
case AP_PARAM_FLOAT:
port->printf("%s: %f\n", s, (double)((AP_Float *)ap)->get());
break;
default:
break;
}
}
// print the value of all variables
void AP_Param::show(const AP_Param *ap, const ParamToken &token,
enum ap_var_type type, AP_HAL::BetterStream *port)
{
char s[AP_MAX_NAME_SIZE+1];
ap->copy_name_token(token, s, sizeof(s), true);
s[AP_MAX_NAME_SIZE] = 0;
show(ap, s, type, port);
}
// print the value of all variables
void AP_Param::show_all(AP_HAL::BetterStream *port, bool showKeyValues)
{
ParamToken token;
AP_Param *ap;
enum ap_var_type type;
for (ap=AP_Param::first(&token, &type);
ap;
ap=AP_Param::next_scalar(&token, &type)) {
if (showKeyValues) {
port->printf("Key %i: Index %i: GroupElement %i : ", token.key, token.idx, token.group_element);
}
show(ap, token, type, port);
}
}
/*
find an old parameter and return it.
*/

View File

@ -344,21 +344,6 @@ public:
///
static void erase_all(void);
/// print the value of all variables
static void show_all(AP_HAL::BetterStream *port, bool showKeyValues=false);
/// print the value of one variable
static void show(const AP_Param *param,
const char *name,
enum ap_var_type ptype,
AP_HAL::BetterStream *port);
/// print the value of one variable
static void show(const AP_Param *param,
const ParamToken &token,
enum ap_var_type ptype,
AP_HAL::BetterStream *port);
/// Returns the first variable
///
/// @return The first variable in _var_info, or nullptr if