Fix unable to arm using after setting mode range for arm and being able
to arm using sticks after removing all mode ranges for arm.
This commit is contained in:
parent
b84636ccf7
commit
c0dbde0318
|
@ -519,6 +519,8 @@ void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, es
|
||||||
escAndServoConfig = escAndServoConfigToUse;
|
escAndServoConfig = escAndServoConfigToUse;
|
||||||
pidProfile = pidProfileToUse;
|
pidProfile = pidProfileToUse;
|
||||||
|
|
||||||
|
isUsingSticksToArm = true;
|
||||||
|
|
||||||
for (index = 0; index < MAX_MODE_ACTIVATION_CONDITION_COUNT; index++) {
|
for (index = 0; index < MAX_MODE_ACTIVATION_CONDITION_COUNT; index++) {
|
||||||
modeActivationCondition_t *modeActivationCondition = &modeActivationConditions[index];
|
modeActivationCondition_t *modeActivationCondition = &modeActivationConditions[index];
|
||||||
if (modeActivationCondition->modeId == BOXARM && IS_RANGE_USABLE(&modeActivationCondition->range)) {
|
if (modeActivationCondition->modeId == BOXARM && IS_RANGE_USABLE(&modeActivationCondition->range)) {
|
||||||
|
|
|
@ -80,6 +80,8 @@ extern uint16_t cycleTime; // FIXME dependency on mw.c
|
||||||
extern uint16_t rssi; // FIXME dependency on mw.c
|
extern uint16_t rssi; // FIXME dependency on mw.c
|
||||||
extern int16_t debug[4]; // FIXME dependency on mw.c
|
extern int16_t debug[4]; // FIXME dependency on mw.c
|
||||||
|
|
||||||
|
void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, escAndServoConfig_t *escAndServoConfigToUse, pidProfile_t *pidProfileToUse);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MSP Guidelines, emphasis is used to clarify.
|
* MSP Guidelines, emphasis is used to clarify.
|
||||||
*
|
*
|
||||||
|
@ -1172,6 +1174,8 @@ static bool processInCommand(void)
|
||||||
mac->auxChannelIndex = read8();
|
mac->auxChannelIndex = read8();
|
||||||
mac->range.startStep = read8();
|
mac->range.startStep = read8();
|
||||||
mac->range.endStep = read8();
|
mac->range.endStep = read8();
|
||||||
|
|
||||||
|
useRcControlsConfig(currentProfile->modeActivationConditions, &masterConfig.escAndServoConfig, ¤tProfile->pidProfile);
|
||||||
} else {
|
} else {
|
||||||
headSerialError(0);
|
headSerialError(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue