1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00

Remove deprecated CLI name command

Functionality replaced with `set name = ` syntax.
This commit is contained in:
Bruce Luckcuck 2019-09-06 09:06:54 -04:00
parent db66284567
commit 9889e59f78

View file

@ -2986,23 +2986,6 @@ static void printName(dumpFlags_t dumpMask, const pilotConfig_t *pilotConfig)
cliDumpPrintLinef(dumpMask, equalsDefault, "\r\n# name: %s", equalsDefault ? emptyName : pilotConfig->name); cliDumpPrintLinef(dumpMask, equalsDefault, "\r\n# name: %s", equalsDefault ? emptyName : pilotConfig->name);
} }
static void cliName(char *cmdline)
{
const unsigned int len = strlen(cmdline);
bool updated = false;
if (len > 0) {
memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name));
if (strncmp(cmdline, emptyName, len)) {
strncpy(pilotConfigMutable()->name, cmdline, MIN(len, MAX_NAME_LENGTH));
}
updated = true;
}
printName(DUMP_MASTER, pilotConfig());
if (updated) {
cliPrintLine("###WARNING: This command will be removed. Use 'set name = ' instead.###");
}
}
#if defined(USE_BOARD_INFO) #if defined(USE_BOARD_INFO)
#define ERROR_MESSAGE "%s CANNOT BE CHANGED. CURRENT VALUE: '%s'" #define ERROR_MESSAGE "%s CANNOT BE CHANGED. CURRENT VALUE: '%s'"
@ -6322,7 +6305,6 @@ const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("msc", "switch into msc mode", NULL, cliMsc), CLI_COMMAND_DEF("msc", "switch into msc mode", NULL, cliMsc),
#endif #endif
#endif #endif
CLI_COMMAND_DEF("name", "name of craft", NULL, cliName),
#ifndef MINIMAL_CLI #ifndef MINIMAL_CLI
CLI_COMMAND_DEF("play_sound", NULL, "[<index>]", cliPlaySound), CLI_COMMAND_DEF("play_sound", NULL, "[<index>]", cliPlaySound),
#endif #endif