Merge pull request #6496 from McGiverGim/cms_throttle_boost

Add Throttle Boost to CMS
This commit is contained in:
Michael Keller 2018-07-31 23:59:21 +12:00 committed by GitHub
commit 45002a803e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -247,6 +247,7 @@ static uint8_t cmsx_feedForwardTransition;
static uint8_t cmsx_angleStrength; static uint8_t cmsx_angleStrength;
static uint8_t cmsx_horizonStrength; static uint8_t cmsx_horizonStrength;
static uint8_t cmsx_horizonTransition; static uint8_t cmsx_horizonTransition;
static uint8_t cmsx_throttleBoost;
static uint16_t cmsx_itermAcceleratorGain; static uint16_t cmsx_itermAcceleratorGain;
static uint16_t cmsx_itermThrottleThreshold; static uint16_t cmsx_itermThrottleThreshold;
@ -265,6 +266,8 @@ static long cmsx_profileOtherOnEnter(void)
cmsx_itermAcceleratorGain = pidProfile->itermAcceleratorGain; cmsx_itermAcceleratorGain = pidProfile->itermAcceleratorGain;
cmsx_itermThrottleThreshold = pidProfile->itermThrottleThreshold; cmsx_itermThrottleThreshold = pidProfile->itermThrottleThreshold;
cmsx_throttleBoost = pidProfile->throttle_boost;
return 0; return 0;
} }
@ -283,6 +286,8 @@ static long cmsx_profileOtherOnExit(const OSD_Entry *self)
pidProfile->itermAcceleratorGain = cmsx_itermAcceleratorGain; pidProfile->itermAcceleratorGain = cmsx_itermAcceleratorGain;
pidProfile->itermThrottleThreshold = cmsx_itermThrottleThreshold; pidProfile->itermThrottleThreshold = cmsx_itermThrottleThreshold;
pidProfile->throttle_boost = cmsx_throttleBoost;
return 0; return 0;
} }
@ -295,6 +300,9 @@ static OSD_Entry cmsx_menuProfileOtherEntries[] = {
{ "HORZN TRS", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_horizonTransition, 0, 200, 1 } , 0 }, { "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 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 }, { "AG THR", OME_UINT16, NULL, &(OSD_UINT16_t) { &cmsx_itermThrottleThreshold, 20, 1000, 1 } , 0 },
#ifdef USE_THROTTLE_BOOST
{ "THR BOOST", OME_UINT16, NULL, &(OSD_UINT8_t) { &cmsx_throttleBoost, 0, 100, 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 }
@ -349,7 +357,9 @@ static OSD_Entry cmsx_menuFilterGlobalEntries[] =
{ "-- FILTER GLB --", OME_Label, NULL, NULL, 0 }, { "-- FILTER GLB --", OME_Label, NULL, NULL, 0 },
{ "GYRO LPF", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_lowpass_hz, 0, 16000, 1 }, 0 }, { "GYRO LPF", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_lowpass_hz, 0, 16000, 1 }, 0 },
#ifdef USE_GYRO_LPF2
{ "GYRO LPF2", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_lowpass2_hz, 0, 16000, 1 }, 0 }, { "GYRO LPF2", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_lowpass2_hz, 0, 16000, 1 }, 0 },
#endif
{ "GYRO NF1", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_hz_1, 0, 500, 1 }, 0 }, { "GYRO NF1", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_hz_1, 0, 500, 1 }, 0 },
{ "GYRO NF1C", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_cutoff_1, 0, 500, 1 }, 0 }, { "GYRO NF1C", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_cutoff_1, 0, 500, 1 }, 0 },
{ "GYRO NF2", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_hz_2, 0, 500, 1 }, 0 }, { "GYRO NF2", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_gyro_soft_notch_hz_2, 0, 500, 1 }, 0 },