1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Add Throttle Boost to CMS

This commit is contained in:
Miguel Angel Mulero Martinez 2018-07-31 09:18:06 +02:00
parent 5a045f2246
commit df4b893d61

View file

@ -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;
@ -265,6 +266,8 @@ static long cmsx_profileOtherOnEnter(void)
cmsx_itermAcceleratorGain = pidProfile->itermAcceleratorGain;
cmsx_itermThrottleThreshold = pidProfile->itermThrottleThreshold;
cmsx_throttleBoost = pidProfile->throttle_boost;
return 0;
}
@ -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;
}
@ -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 }