Skip to content

Commit

Permalink
Add Throttle Boost to CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed Jul 31, 2018
1 parent 5a045f2 commit df4b893
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/cms/cms_menu_imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static uint8_t cmsx_feedForwardTransition;
static uint8_t cmsx_angleStrength;
static uint8_t cmsx_horizonStrength;
static uint8_t cmsx_horizonTransition;
static uint8_t cmsx_throttleBoost;
static uint16_t cmsx_itermAcceleratorGain;
static uint16_t cmsx_itermThrottleThreshold;

Expand All @@ -265,6 +266,8 @@ static long cmsx_profileOtherOnEnter(void)
cmsx_itermAcceleratorGain = pidProfile->itermAcceleratorGain;
cmsx_itermThrottleThreshold = pidProfile->itermThrottleThreshold;

cmsx_throttleBoost = pidProfile->throttle_boost;

return 0;
}

Expand All @@ -283,6 +286,8 @@ static long cmsx_profileOtherOnExit(const OSD_Entry *self)
pidProfile->itermAcceleratorGain = cmsx_itermAcceleratorGain;
pidProfile->itermThrottleThreshold = cmsx_itermThrottleThreshold;

pidProfile->throttle_boost = cmsx_throttleBoost;

return 0;
}

Expand All @@ -295,6 +300,7 @@ static OSD_Entry cmsx_menuProfileOtherEntries[] = {
{ "HORZN TRS", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_horizonTransition, 0, 200, 1 } , 0 },
{ "AG GAIN", OME_UINT16, NULL, &(OSD_UINT16_t) { &cmsx_itermAcceleratorGain, 1000, 30000, 10 } , 0 },
{ "AG THR", OME_UINT16, NULL, &(OSD_UINT16_t) { &cmsx_itermThrottleThreshold, 20, 1000, 1 } , 0 },
{ "THR BOOST", OME_UINT16, NULL, &(OSD_UINT8_t) { &cmsx_throttleBoost, 0, 100, 1 } , 0 },

{ "BACK", OME_Back, NULL, NULL, 0 },
{ NULL, OME_END, NULL, NULL, 0 }
Expand Down

0 comments on commit df4b893

Please sign in to comment.