1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Merge pull request #8720 from iNavFlight/MrD_Add-pilot-name

Add pilot name
This commit is contained in:
Darren Lines 2023-01-20 08:03:27 +00:00 committed by GitHub
commit 87363ba3ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 11 deletions

View file

@ -1419,7 +1419,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
case MSP_NAME:
{
const char *name = systemConfig()->name;
const char *name = systemConfig()->craftName;
while (*name) {
sbufWriteU8(dst, *name++);
}
@ -2789,7 +2789,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
case MSP_SET_NAME:
if (dataSize <= MAX_NAME_LENGTH) {
char *name = systemConfigMutable()->name;
char *name = systemConfigMutable()->craftName;
int len = MIN(MAX_NAME_LENGTH, (int)dataSize);
sbufReadData(src, name, len);
memset(&name[len], '\0', (MAX_NAME_LENGTH + 1) - len);