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

First cut of allowing a 3POS switch on AUX3 to change rc rate.

rcRate is decreased when low, increased when HIGH and no change when the
switch is in the middle.

The rcRate ticks up/down at 0.01 every 500ms if the switch is left on.

If using a momentary switch and if you can toggle the switch between
middle and low or middle and high more frequently than 500ms then the
rate will be increased accordingly.  Similar to how a keyboard repeat
behaves.
This commit is contained in:
Dominic Clifton 2014-10-22 22:53:22 +01:00
parent fd32ad6fcb
commit 6d7035819f
7 changed files with 324 additions and 4 deletions

View file

@ -127,6 +127,19 @@ bool areSticksInApModePosition(uint16_t ap_mode);
throttleStatus_e calculateThrottleStatus(rxConfig_t *rxConfig, uint16_t deadband3d_throttle);
void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStatus, bool retarded_arm, bool disarm_kill_switch);
void updateActivatedModes(modeActivationCondition_t *modeActivationConditions);
typedef enum {
ADJUSTMENT_NONE = 0,
ADJUSTMENT_RC_RATE
} adjustmentFunction_e;
#define ADJUSTMENT_COUNT 1
#define ADJUSTMENT_INDEX_OFFSET 1
void processRcAdjustments(controlRateConfig_t *controlRateConfig, rxConfig_t *rxConfig);
void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions);