mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 07:15:18 +03:00
add angle limit to 'pid profile other' cms menu
This commit is contained in:
parent
1ceb80d11f
commit
412adf8b62
1 changed files with 5 additions and 0 deletions
|
@ -500,6 +500,7 @@ static CMS_Menu cmsx_menuLaunchControl = {
|
|||
static uint8_t cmsx_angleStrength;
|
||||
static uint8_t cmsx_horizonStrength;
|
||||
static uint8_t cmsx_horizonTransition;
|
||||
static uint8_t cmsx_levelAngleLimit;
|
||||
static uint8_t cmsx_throttleBoost;
|
||||
static uint8_t cmsx_thrustLinearization;
|
||||
static uint16_t cmsx_itermAcceleratorGain;
|
||||
|
@ -541,6 +542,7 @@ static const void *cmsx_profileOtherOnEnter(displayPort_t *pDisp)
|
|||
cmsx_angleStrength = pidProfile->pid[PID_LEVEL].P;
|
||||
cmsx_horizonStrength = pidProfile->pid[PID_LEVEL].I;
|
||||
cmsx_horizonTransition = pidProfile->pid[PID_LEVEL].D;
|
||||
cmsx_levelAngleLimit = pidProfile->levelAngleLimit;
|
||||
|
||||
cmsx_itermAcceleratorGain = pidProfile->itermAcceleratorGain;
|
||||
cmsx_itermThrottleThreshold = pidProfile->itermThrottleThreshold;
|
||||
|
@ -590,6 +592,7 @@ static const void *cmsx_profileOtherOnExit(displayPort_t *pDisp, const OSD_Entry
|
|||
pidProfile->pid[PID_LEVEL].P = cmsx_angleStrength;
|
||||
pidProfile->pid[PID_LEVEL].I = cmsx_horizonStrength;
|
||||
pidProfile->pid[PID_LEVEL].D = cmsx_horizonTransition;
|
||||
pidProfile->levelAngleLimit = cmsx_levelAngleLimit;
|
||||
|
||||
pidProfile->itermAcceleratorGain = cmsx_itermAcceleratorGain;
|
||||
pidProfile->itermThrottleThreshold = cmsx_itermThrottleThreshold;
|
||||
|
@ -642,6 +645,8 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = {
|
|||
{ "ANGLE STR", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_angleStrength, 0, 200, 1 } },
|
||||
{ "HORZN STR", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_horizonStrength, 0, 200, 1 } },
|
||||
{ "HORZN TRS", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_horizonTransition, 0, 200, 1 } },
|
||||
{ "ANGLE LIMIT", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_levelAngleLimit, 10, 90, 1 } },
|
||||
|
||||
{ "AG GAIN", OME_UINT16, NULL, &(OSD_UINT16_t) { &cmsx_itermAcceleratorGain, ITERM_ACCELERATOR_GAIN_OFF, ITERM_ACCELERATOR_GAIN_MAX, 10 } },
|
||||
{ "AG THR", OME_UINT16, NULL, &(OSD_UINT16_t) { &cmsx_itermThrottleThreshold, 20, 1000, 1 } },
|
||||
#ifdef USE_THROTTLE_BOOST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue