1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Seperate adjustment configuration from adjustment state. Rename 'step'

parameter to 'delta' applying the adjustment.  Configure adjustment
states based on adjustment configuration for AUX3 and AUX4.
This commit is contained in:
Dominic Clifton 2014-10-24 15:46:07 +01:00
parent 45d9678a39
commit a2a9443045
3 changed files with 59 additions and 23 deletions

View file

@ -187,6 +187,10 @@ rxConfig_t rxConfig;
extern uint8_t adjustmentStateMask;
static const adjustmentConfig_t rateAdjustmentConfig = {
.adjustmentFunction = ADJUSTMENT_RC_RATE,
.step = 1
};
TEST(RcControlsTest, processRcAdjustmentsSticksInMiddle)
{
// given
@ -205,6 +209,8 @@ TEST(RcControlsTest, processRcAdjustmentsSticksInMiddle)
rxConfig.maxcheck = DEFAULT_MAX_CHECK;
rxConfig.midrc = 1500;
configureAdjustment(0, AUX3 - NON_AUX_CHANNEL_COUNT, &rateAdjustmentConfig);
// and
uint8_t index;
for (index = AUX1; index < MAX_SUPPORTED_RC_CHANNEL_COUNT; index++) {
@ -241,6 +247,9 @@ TEST(RcControlsTest, processRcAdjustmentsWithRcRateFunctionSwitchUp)
rxConfig.maxcheck = DEFAULT_MAX_CHECK;
rxConfig.midrc = 1500;
// and
configureAdjustment(0, AUX3 - NON_AUX_CHANNEL_COUNT, &rateAdjustmentConfig);
// and
uint8_t index;
for (index = AUX1; index < MAX_SUPPORTED_RC_CHANNEL_COUNT; index++) {