diff --git a/src/main/cms/cms_menu_imu.c b/src/main/cms/cms_menu_imu.c index db2a43702b..230c0e2f8b 100644 --- a/src/main/cms/cms_menu_imu.c +++ b/src/main/cms/cms_menu_imu.c @@ -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 } };