mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Additional fixes after feedback
This commit is contained in:
parent
1ee8224706
commit
6c63aa78ca
2 changed files with 2 additions and 2 deletions
|
@ -2502,7 +2502,7 @@ static void cliName(char *cmdline)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint32_t len = strlen(cmdline);
|
uint32_t len = strlen(cmdline);
|
||||||
if (*cmdline == 0) {
|
if (len == 0) {
|
||||||
cliPrintf("name %s\r\n", masterConfig.name);
|
cliPrintf("name %s\r\n", masterConfig.name);
|
||||||
} else if ('-' == cmdline[0]) {
|
} else if ('-' == cmdline[0]) {
|
||||||
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);
|
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);
|
||||||
|
|
|
@ -1878,7 +1878,7 @@ static bool processInCommand(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_SET_NAME:
|
case MSP_SET_NAME:
|
||||||
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);
|
memset(masterConfig.name, 0, MAX_NAME_LENGTH+1);
|
||||||
for (i = 0; i < MIN(MAX_NAME_LENGTH, currentPort->dataSize); i++) {
|
for (i = 0; i < MIN(MAX_NAME_LENGTH, currentPort->dataSize); i++) {
|
||||||
masterConfig.name[i] = read8();
|
masterConfig.name[i] = read8();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue