Browse Source

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.
master
Dominic Clifton 10 years ago
parent
commit
c0dbde0318
  1. 2
      src/main/io/rc_controls.c
  2. 4
      src/main/io/serial_msp.c

2
src/main/io/rc_controls.c

@ -519,6 +519,8 @@ void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, es
escAndServoConfig = escAndServoConfigToUse;
pidProfile = pidProfileToUse;
isUsingSticksToArm = true;
for (index = 0; index < MAX_MODE_ACTIVATION_CONDITION_COUNT; index++) {
modeActivationCondition_t *modeActivationCondition = &modeActivationConditions[index];
if (modeActivationCondition->modeId == BOXARM && IS_RANGE_USABLE(&modeActivationCondition->range)) {

4
src/main/io/serial_msp.c

@ -80,6 +80,8 @@ extern uint16_t cycleTime; // FIXME dependency on mw.c
extern uint16_t rssi; // 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.
*
@ -1172,6 +1174,8 @@ static bool processInCommand(void)
mac->auxChannelIndex = read8();
mac->range.startStep = read8();
mac->range.endStep = read8();
useRcControlsConfig(currentProfile->modeActivationConditions, &masterConfig.escAndServoConfig, &currentProfile->pidProfile);
} else {
headSerialError(0);
}

Loading…
Cancel
Save