Merge pull request #10245 from IllusionFpv/add-vbat-sag-compensation-in-cms
Added vbat sag compensation in CMS
This commit is contained in:
commit
871e709459
|
@ -378,6 +378,10 @@ static uint8_t cmsx_d_min_gain;
|
|||
static uint8_t cmsx_d_min_advance;
|
||||
#endif
|
||||
|
||||
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||
static uint8_t cmsx_vbat_sag_compensation;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ITERM_RELAX
|
||||
static uint8_t cmsx_iterm_relax;
|
||||
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;
|
||||
#endif
|
||||
|
||||
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||
cmsx_vbat_sag_compensation = pidProfile->vbat_sag_compensation;
|
||||
#endif
|
||||
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;
|
||||
#endif
|
||||
|
||||
#ifdef USE_BATTERY_VOLTAGE_SAG_COMPENSATION
|
||||
pidProfile->vbat_sag_compensation = cmsx_vbat_sag_compensation;
|
||||
#endif
|
||||
|
||||
initEscEndpoints();
|
||||
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 },
|
||||
#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 },
|
||||
{ NULL, OME_END, NULL, NULL, 0 }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue