1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Fixed PID profile switching.

This commit is contained in:
mikeller 2018-12-15 22:50:24 +13:00
parent 497ede203f
commit 53278c08f8
7 changed files with 53 additions and 66 deletions

View file

@ -66,8 +66,6 @@
#include "flight/pid.h"
#include "flight/failsafe.h"
static pidProfile_t *pidProfile;
// true if arming is done via the sticks (as opposed to a switch)
static bool isUsingSticksToArm = true;
@ -392,9 +390,7 @@ int32_t getRcStickDeflection(int32_t axis, uint16_t midrc) {
return MIN(ABS(rcData[axis] - midrc), 500);
}
void useRcControlsConfig(pidProfile_t *pidProfileToUse)
void rcControlsInit(void)
{
pidProfile = pidProfileToUse;
isUsingSticksToArm = !isModeActivationConditionPresent(BOXARM);
}