Remove deprecated CLI name command (#8837)
Remove deprecated CLI name command
This commit is contained in:
commit
f02e1e081f
|
@ -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);
|
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'"
|
||||||
|
@ -6342,7 +6325,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
|
||||||
|
|
Loading…
Reference in New Issue