mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Drop Betaflight PIDc support for OPBL
This commit is contained in:
parent
5e5b44f593
commit
f4796c3676
4 changed files with 9 additions and 0 deletions
|
@ -199,7 +199,11 @@ static void resetControlRateConfig(controlRateConfig_t *controlRateConfig)
|
|||
|
||||
static void resetPidProfile(pidProfile_t *pidProfile)
|
||||
{
|
||||
#if defined(SKIP_PID_FLOAT)
|
||||
pidProfile->pidController = PID_CONTROLLER_LEGACY;
|
||||
#else
|
||||
pidProfile->pidController = PID_CONTROLLER_BETAFLIGHT;
|
||||
#endif
|
||||
|
||||
pidProfile->P8[ROLL] = 45;
|
||||
pidProfile->I8[ROLL] = 40;
|
||||
|
|
|
@ -862,7 +862,9 @@ const clivalue_t valueTable[] = {
|
|||
{ "yaw_lowpass", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.yaw_lpf_hz, .config.minmax = {0, 500 } },
|
||||
{ "pid_process_denom", VAR_UINT8 | MASTER_VALUE, &masterConfig.pid_process_denom, .config.minmax = { 1, 8 } },
|
||||
|
||||
#ifndef SKIP_PID_FLOAT
|
||||
{ "pid_controller", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.pidController, .config.lookup = { TABLE_PID_CONTROLLER } },
|
||||
#endif
|
||||
|
||||
{ "p_pitch", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.P8[PITCH], .config.minmax = { 0, 200 } },
|
||||
{ "i_pitch", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.I8[PITCH], .config.minmax = { 0, 200 } },
|
||||
|
|
|
@ -1353,8 +1353,10 @@ static bool processInCommand(void)
|
|||
read16();
|
||||
break;
|
||||
case MSP_SET_PID_CONTROLLER:
|
||||
#ifndef SKIP_PID_FLOAT
|
||||
currentProfile->pidProfile.pidController = constrain(read8(), 0, 1);
|
||||
pidSetController(currentProfile->pidProfile.pidController);
|
||||
#endif
|
||||
break;
|
||||
case MSP_SET_PID:
|
||||
for (i = 0; i < PID_ITEM_COUNT; i++) {
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
#undef SONAR
|
||||
#undef USE_SOFTSERIAL1
|
||||
#undef LED_STRIP
|
||||
#define SKIP_PID_FLOAT
|
||||
#endif
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue