mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Merge pull request #7062 from etracer65/add_tpa_d_only_mode
Make TPA configurable to affect P/D or D only
This commit is contained in:
commit
3cbf8ae02f
6 changed files with 33 additions and 2 deletions
|
@ -407,6 +407,12 @@ static const char * const lookupTableLaunchControlMode[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_TPA_MODE
|
||||
static const char * const lookupTableTpaMode[] = {
|
||||
"PD", "D"
|
||||
};
|
||||
#endif
|
||||
|
||||
#define LOOKUP_TABLE_ENTRY(name) { name, ARRAYLEN(name) }
|
||||
|
||||
const lookupTableEntry_t lookupTables[] = {
|
||||
|
@ -510,6 +516,9 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
#ifdef USE_LAUNCH_CONTROL
|
||||
LOOKUP_TABLE_ENTRY(lookupTableLaunchControlMode),
|
||||
#endif
|
||||
#ifdef USE_TPA_MODE
|
||||
LOOKUP_TABLE_ENTRY(lookupTableTpaMode),
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef LOOKUP_TABLE_ENTRY
|
||||
|
@ -781,6 +790,9 @@ const clivalue_t valueTable[] = {
|
|||
{ "yaw_srate", VAR_UINT8 | PROFILE_RATE_VALUE, .config.minmax = { 0, CONTROL_RATE_CONFIG_RATE_MAX }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, rates[FD_YAW]) },
|
||||
{ "tpa_rate", VAR_UINT8 | PROFILE_RATE_VALUE, .config.minmax = { 0, CONTROL_RATE_CONFIG_TPA_MAX}, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, dynThrPID) },
|
||||
{ "tpa_breakpoint", VAR_UINT16 | PROFILE_RATE_VALUE, .config.minmax = { PWM_PULSE_MIN, PWM_PULSE_MAX }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, tpa_breakpoint) },
|
||||
#ifdef USE_TPA_MODE
|
||||
{ "tpa_mode", VAR_UINT8 | PROFILE_RATE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_TPA_MODE }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, tpaMode) },
|
||||
#endif
|
||||
{ "throttle_limit_type", VAR_UINT8 | PROFILE_RATE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_THROTTLE_LIMIT_TYPE }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, throttle_limit_type) },
|
||||
{ "throttle_limit_percent", VAR_UINT8 | PROFILE_RATE_VALUE, .config.minmax = { 25, 100 }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, throttle_limit_percent) },
|
||||
{ "roll_rate_limit", VAR_UINT16 | PROFILE_RATE_VALUE, .config.minmax = { CONTROL_RATE_CONFIG_RATE_LIMIT_MIN, CONTROL_RATE_CONFIG_RATE_LIMIT_MAX }, PG_CONTROL_RATE_PROFILES, offsetof(controlRateConfig_t, rate_limit[FD_ROLL]) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue