mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 07:15:18 +03:00
Fix TPA (#11969)
This commit is contained in:
parent
b44129f38d
commit
139210e403
6 changed files with 18 additions and 15 deletions
|
@ -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 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue