1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

MSP_SET_NAME

This commit is contained in:
KiteAnton 2016-07-13 23:29:51 +02:00
parent 1e4a0c72fc
commit c04e6a4bd7
3 changed files with 10 additions and 0 deletions

View file

@ -2505,6 +2505,9 @@ static void cliName(char *cmdline)
cliPrintf("name %s\r\n", masterConfig.name);
} else if (len <= MAX_NAME_LENGTH) {
strcpy(masterConfig.name, cmdline);
for (uint8_t i = len; i<MAX_NAME_LENGTH; i++) {
masterConfig.name[i] = '\0';
}
cliPrintf("name %s\r\n", masterConfig.name);
} else {
cliPrintf("Max allowed name length is %d\r\n", MAX_NAME_LENGTH);