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

Preparation for conversion to parameter groups 9

This commit is contained in:
Martin Budden 2017-02-16 22:41:01 +00:00
parent 5507924b5a
commit e8d0cd1eec
7 changed files with 38 additions and 15 deletions

View file

@ -1567,10 +1567,9 @@ static void cliRxFailsafe(char *cmdline)
channel = atoi(ptr++);
if ((channel < MAX_SUPPORTED_RC_CHANNEL_COUNT)) {
rxFailsafeChannelConfig_t *channelFailsafeConfig = &rxConfig()->failsafe_channel_configurations[channel];
rxFailsafeChannelConfig_t *channelFailsafeConfig = &rxConfigMutable()->failsafe_channel_configurations[channel];
uint16_t value;
rxFailsafeChannelType_e type = (channel < NON_AUX_CHANNEL_COUNT) ? RX_FAILSAFE_TYPE_FLIGHT : RX_FAILSAFE_TYPE_AUX;
const rxFailsafeChannelType_e type = (channel < NON_AUX_CHANNEL_COUNT) ? RX_FAILSAFE_TYPE_FLIGHT : RX_FAILSAFE_TYPE_AUX;
rxFailsafeChannelMode_e mode = channelFailsafeConfig->mode;
bool requireValue = channelFailsafeConfig->mode == RX_FAILSAFE_MODE_SET;
@ -1596,7 +1595,7 @@ static void cliRxFailsafe(char *cmdline)
cliShowParseError();
return;
}
value = atoi(ptr);
uint16_t value = atoi(ptr);
value = CHANNEL_VALUE_TO_RXFAIL_STEP(value);
if (value > MAX_RXFAIL_RANGE_STEP) {
cliPrint("Value out of range\r\n");
@ -2004,7 +2003,7 @@ static void printMotorMix(uint8_t dumpMask, const motorMixer_t *customMotorMixer
char buf2[8];
char buf3[8];
for (uint32_t i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
if (customMotorMixer(i)->throttle == 0.0f)
if (customMotorMixer[i].throttle == 0.0f)
break;
const float thr = customMotorMixer[i].throttle;
const float roll = customMotorMixer[i].roll;