1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

MSP messages to get and set PID and rate profile names. (#12020)

* MSP messages to get and set PID and rate profile names.

* Use MSP2_SET_TEXT and MSP2_GET_TEXT messages instead separate ones.
This commit is contained in:
Vasyl Demianov 2022-12-02 03:55:00 +02:00 committed by GitHub
parent a89af14587
commit b7b53399ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -2533,6 +2533,14 @@ static mspResult_e mspFcProcessOutCommandWithArg(mspDescriptor_t srcDesc, int16_
textVar = pilotConfigMutable()->craftName;
break;
case MSP2TEXT_PID_PROFILE_NAME:
textVar = currentPidProfile->profileName;
break;
case MSP2TEXT_RATE_PROFILE_NAME:
textVar = currentControlRateProfile->profileName;
break;
default:
return MSP_RESULT_ERROR;
}
@ -3927,6 +3935,14 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
textVar = pilotConfigMutable()->craftName;
break;
case MSP2TEXT_PID_PROFILE_NAME:
textVar = currentPidProfile->profileName;
break;
case MSP2TEXT_RATE_PROFILE_NAME:
textVar = currentControlRateProfile->profileName;
break;
default:
return MSP_RESULT_ERROR;
}