mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Added selectable RaceFlight rates.
This commit is contained in:
parent
bca7b905b5
commit
ee65eba88d
21 changed files with 260 additions and 135 deletions
|
@ -33,21 +33,23 @@
|
|||
|
||||
controlRateConfig_t *currentControlRateProfile;
|
||||
|
||||
|
||||
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 0);
|
||||
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 1);
|
||||
|
||||
void pgResetFn_controlRateProfiles(controlRateConfig_t *controlRateConfig)
|
||||
{
|
||||
for (int i = 0; i < CONTROL_RATE_PROFILE_COUNT; i++) {
|
||||
RESET_CONFIG(controlRateConfig_t, &controlRateConfig[i],
|
||||
.rcRate8 = 100,
|
||||
.rcYawRate8 = 100,
|
||||
.rcExpo8 = 0,
|
||||
.thrMid8 = 50,
|
||||
.thrExpo8 = 0,
|
||||
.dynThrPID = 10,
|
||||
.rcYawExpo8 = 0,
|
||||
.tpa_breakpoint = 1650,
|
||||
.rates_type = RATES_TYPE_BETAFLIGHT,
|
||||
.rcRates[FD_ROLL] = 100,
|
||||
.rcRates[FD_PITCH] = 100,
|
||||
.rcRates[FD_YAW] = 100,
|
||||
.rcExpo[FD_ROLL] = 0,
|
||||
.rcExpo[FD_PITCH] = 0,
|
||||
.rcExpo[FD_YAW] = 0,
|
||||
.rates[FD_ROLL] = 70,
|
||||
.rates[FD_PITCH] = 70,
|
||||
.rates[FD_YAW] = 70
|
||||
|
@ -69,7 +71,7 @@ void changeControlRateProfile(uint8_t controlRateProfileIndex)
|
|||
controlRateProfileIndex = CONTROL_RATE_PROFILE_COUNT - 1;
|
||||
}
|
||||
setControlRateProfile(controlRateProfileIndex);
|
||||
generateThrottleCurve();
|
||||
initRcProcessing();
|
||||
}
|
||||
|
||||
void copyControlRateProfile(const uint8_t dstControlRateProfileIndex, const uint8_t srcControlRateProfileIndex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue