mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
added vbat sag compensation in CMS
This commit is contained in:
parent
5db852a2f4
commit
ff79f2927d
1 changed files with 15 additions and 0 deletions
|
@ -378,6 +378,10 @@ static uint8_t cmsx_d_min_gain;
|
||||||
static uint8_t cmsx_d_min_advance;
|
static uint8_t cmsx_d_min_advance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||||
|
static uint8_t cmsx_vbat_sag_compensation;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ITERM_RELAX
|
#ifdef USE_ITERM_RELAX
|
||||||
static uint8_t cmsx_iterm_relax;
|
static uint8_t cmsx_iterm_relax;
|
||||||
static uint8_t cmsx_iterm_relax_type;
|
static uint8_t cmsx_iterm_relax_type;
|
||||||
|
@ -431,6 +435,9 @@ static const void *cmsx_profileOtherOnEnter(displayPort_t *pDisp)
|
||||||
cmsx_ff_smooth_factor = pidProfile->ff_smooth_factor;
|
cmsx_ff_smooth_factor = pidProfile->ff_smooth_factor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||||
|
cmsx_vbat_sag_compensation = pidProfile->vbat_sag_compensation;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,6 +482,10 @@ static const void *cmsx_profileOtherOnExit(displayPort_t *pDisp, const OSD_Entry
|
||||||
pidProfile->ff_smooth_factor = cmsx_ff_smooth_factor;
|
pidProfile->ff_smooth_factor = cmsx_ff_smooth_factor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||||
|
pidProfile->vbat_sag_compensation = cmsx_vbat_sag_compensation;
|
||||||
|
#endif
|
||||||
|
|
||||||
initEscEndpoints();
|
initEscEndpoints();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -519,6 +530,10 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = {
|
||||||
{ "D_MIN ADV", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_d_min_advance, 0, 200, 1 }, 0 },
|
{ "D_MIN ADV", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_d_min_advance, 0, 200, 1 }, 0 },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||||
|
{ "VBAT_SAG_COMP", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_vbat_sag_compensation, 0, 150, 1 }, 0 },
|
||||||
|
#endif
|
||||||
|
|
||||||
{ "BACK", OME_Back, NULL, NULL, 0 },
|
{ "BACK", OME_Back, NULL, NULL, 0 },
|
||||||
{ NULL, OME_END, NULL, NULL, 0 }
|
{ NULL, OME_END, NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue