mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Disable SPA for angle mode - fix (for wings) (#13848)
* Disable SPA for angle mode - fix (for wings) * moved the logic for axisInAngleMode[axis] inside applySpa * ledvinap's review
This commit is contained in:
parent
f2bd6e69b2
commit
9205c4594f
1 changed files with 7 additions and 1 deletions
|
@ -867,7 +867,13 @@ NOINLINE static void calculateSpaValues(const pidProfile_t *pidProfile)
|
|||
NOINLINE static void applySpa(int axis, const pidProfile_t *pidProfile)
|
||||
{
|
||||
#ifdef USE_WING
|
||||
switch(pidProfile->spa_mode[axis]){
|
||||
spaMode_e mode = pidProfile->spa_mode[axis];
|
||||
|
||||
if (pidRuntime.axisInAngleMode[axis]) {
|
||||
mode = SPA_MODE_OFF;
|
||||
}
|
||||
|
||||
switch(mode) {
|
||||
case SPA_MODE_PID:
|
||||
pidData[axis].P *= pidRuntime.spa[axis];
|
||||
pidData[axis].D *= pidRuntime.spa[axis];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue