1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 07:15:18 +03:00
This commit is contained in:
haslinghuis 2022-11-09 11:18:14 +01:00 committed by GitHub
parent b44129f38d
commit 139210e403
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 15 deletions

View file

@ -530,6 +530,9 @@ static uint8_t cmsx_feedforward_smooth_factor;
static uint8_t cmsx_feedforward_jitter_factor;
#endif
static uint8_t cmsx_tpa_rate;
static uint16_t cmsx_tpa_breakpoint;
static const void *cmsx_profileOtherOnEnter(displayPort_t *pDisp)
{
UNUSED(pDisp);
@ -575,6 +578,8 @@ static const void *cmsx_profileOtherOnEnter(displayPort_t *pDisp)
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
cmsx_vbat_sag_compensation = pidProfile->vbat_sag_compensation;
#endif
cmsx_tpa_rate = pidProfile->tpa_rate;
cmsx_tpa_breakpoint = pidProfile->tpa_breakpoint;
return NULL;
}
@ -624,7 +629,6 @@ static const void *cmsx_profileOtherOnExit(displayPort_t *pDisp, const OSD_Entry
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
pidProfile->vbat_sag_compensation = cmsx_vbat_sag_compensation;
#endif
pidProfile->tpa_rate = cmsx_tpa_rate;
pidProfile->tpa_breakpoint = cmsx_tpa_breakpoint;
@ -678,7 +682,7 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = {
{ "VBAT_SAG_COMP", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_vbat_sag_compensation, 0, 150, 1 } },
#endif
{ "THRPID ATT", OME_FLOAT, NULL, &(OSD_FLOAT_t) { &cmsx_tpa_rate, 0, 100, 1, 10} },
{ "TPA RATE", OME_FLOAT, NULL, &(OSD_FLOAT_t) { &cmsx_tpa_rate, 0, 100, 1, 10} },
{ "TPA BRKPT", OME_UINT16, NULL, &(OSD_UINT16_t){ &cmsx_tpa_breakpoint, 1000, 2000, 10} },
{ "BACK", OME_Back, NULL, NULL },