mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Remove unused pointes if SKIP_CLI_COMMAND_HELP is defiend
This commit is contained in:
parent
7a1342bce5
commit
4e86cd01eb
1 changed files with 4 additions and 3 deletions
|
@ -204,9 +204,10 @@ static const char * const sensorHardwareNames[4][11] = {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
#ifndef SKIP_CLI_COMMAND_HELP
|
||||||
const char *description;
|
const char *description;
|
||||||
const char *args;
|
const char *args;
|
||||||
|
#endif
|
||||||
void (*func)(char *cmdline);
|
void (*func)(char *cmdline);
|
||||||
} clicmd_t;
|
} clicmd_t;
|
||||||
|
|
||||||
|
@ -222,8 +223,6 @@ typedef struct {
|
||||||
#define CLI_COMMAND_DEF(name, description, args, method) \
|
#define CLI_COMMAND_DEF(name, description, args, method) \
|
||||||
{ \
|
{ \
|
||||||
name, \
|
name, \
|
||||||
NULL, \
|
|
||||||
NULL, \
|
|
||||||
method \
|
method \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1710,12 +1709,14 @@ static void cliHelp(char *cmdline)
|
||||||
|
|
||||||
for (i = 0; i < CMD_COUNT; i++) {
|
for (i = 0; i < CMD_COUNT; i++) {
|
||||||
cliPrint(cmdTable[i].name);
|
cliPrint(cmdTable[i].name);
|
||||||
|
#ifndef SKIP_CLI_COMMAND_HELP
|
||||||
if (cmdTable[i].description) {
|
if (cmdTable[i].description) {
|
||||||
printf(" - %s", cmdTable[i].description);
|
printf(" - %s", cmdTable[i].description);
|
||||||
}
|
}
|
||||||
if (cmdTable[i].args) {
|
if (cmdTable[i].args) {
|
||||||
printf("\r\n\t%s", cmdTable[i].args);
|
printf("\r\n\t%s", cmdTable[i].args);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
cliPrint("\r\n");
|
cliPrint("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue