Remove deprecated CLI name command (#8837)

Remove deprecated CLI name command
This commit is contained in:
Michael Keller 2019-10-18 03:28:48 +13:00 committed by GitHub
commit f02e1e081f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 18 deletions

View File

@ -2992,23 +2992,6 @@ static void printName(dumpFlags_t dumpMask, const pilotConfig_t *pilotConfig)
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)
#define ERROR_MESSAGE "%s CANNOT BE CHANGED. CURRENT VALUE: '%s'"
@ -6342,7 +6325,6 @@ const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("msc", "switch into msc mode", NULL, cliMsc),
#endif
#endif
CLI_COMMAND_DEF("name", "name of craft", NULL, cliName),
#ifndef MINIMAL_CLI
CLI_COMMAND_DEF("play_sound", NULL, "[<index>]", cliPlaySound),
#endif