mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 13:55:18 +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:
parent
a89af14587
commit
b7b53399ab
2 changed files with 18 additions and 0 deletions
|
@ -2533,6 +2533,14 @@ static mspResult_e mspFcProcessOutCommandWithArg(mspDescriptor_t srcDesc, int16_
|
||||||
textVar = pilotConfigMutable()->craftName;
|
textVar = pilotConfigMutable()->craftName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MSP2TEXT_PID_PROFILE_NAME:
|
||||||
|
textVar = currentPidProfile->profileName;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MSP2TEXT_RATE_PROFILE_NAME:
|
||||||
|
textVar = currentControlRateProfile->profileName;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return MSP_RESULT_ERROR;
|
return MSP_RESULT_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -3927,6 +3935,14 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
|
||||||
textVar = pilotConfigMutable()->craftName;
|
textVar = pilotConfigMutable()->craftName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MSP2TEXT_PID_PROFILE_NAME:
|
||||||
|
textVar = currentPidProfile->profileName;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MSP2TEXT_RATE_PROFILE_NAME:
|
||||||
|
textVar = currentControlRateProfile->profileName;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return MSP_RESULT_ERROR;
|
return MSP_RESULT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,3 +30,5 @@
|
||||||
// MSP2_SET_TEXT and MSP2_GET_TEXT variable types
|
// MSP2_SET_TEXT and MSP2_GET_TEXT variable types
|
||||||
#define MSP2TEXT_PILOT_NAME 1
|
#define MSP2TEXT_PILOT_NAME 1
|
||||||
#define MSP2TEXT_CRAFT_NAME 2
|
#define MSP2TEXT_CRAFT_NAME 2
|
||||||
|
#define MSP2TEXT_PID_PROFILE_NAME 3
|
||||||
|
#define MSP2TEXT_RATE_PROFILE_NAME 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue