1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Minor updates to naming the craft

This commit is contained in:
blckmn 2016-07-16 12:38:06 +10:00
parent 2fb3ee0192
commit d65f7a0383
3 changed files with 5 additions and 13 deletions

View file

@ -1878,13 +1878,10 @@ static bool processInCommand(void)
break;
case MSP_SET_NAME:
memset(masterConfig.name, 0, MAX_NAME_LENGTH+1);
memset(masterConfig.name, 0, ARRAYLEN(masterConfig.name));
for (i = 0; i < MIN(MAX_NAME_LENGTH, currentPort->dataSize); i++) {
masterConfig.name[i] = read8();
}
if (masterConfig.name[0] == '-') {
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);
}
break;
default:
// we do not know how to handle the (valid) message, indicate error MSP $M!