mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
Merge pull request #2294 from martinbudden/bf_pg_preparation4
Preparation for conversion to parameter groups 4
This commit is contained in:
commit
85e3601112
23 changed files with 92 additions and 124 deletions
|
@ -178,6 +178,15 @@ typedef struct rcControlsConfig_s {
|
|||
|
||||
PG_DECLARE(rcControlsConfig_t, rcControlsConfig);
|
||||
|
||||
typedef struct flight3DConfig_s {
|
||||
uint16_t deadband3d_low; // min 3d value
|
||||
uint16_t deadband3d_high; // max 3d value
|
||||
uint16_t neutral3d; // center 3d value
|
||||
uint16_t deadband3d_throttle; // default throttle deadband from MIDRC
|
||||
} flight3DConfig_t;
|
||||
|
||||
PG_DECLARE(flight3DConfig_t, flight3DConfig);
|
||||
|
||||
typedef struct armingConfig_s {
|
||||
uint8_t gyro_cal_on_first_arm; // allow disarm/arm on throttle down + roll left/right
|
||||
uint8_t disarm_kill_switch; // allow disarm via AUX switch regardless of throttle value
|
||||
|
@ -189,9 +198,8 @@ PG_DECLARE(armingConfig_t, armingConfig);
|
|||
bool areUsingSticksToArm(void);
|
||||
|
||||
bool areSticksInApModePosition(uint16_t ap_mode);
|
||||
struct rxConfig_s;
|
||||
throttleStatus_e calculateThrottleStatus(const struct rxConfig_s *rxConfig, uint16_t deadband3d_throttle);
|
||||
void processRcStickPositions(const struct rxConfig_s *rxConfig, throttleStatus_e throttleStatus, bool disarm_kill_switch);
|
||||
throttleStatus_e calculateThrottleStatus(void);
|
||||
void processRcStickPositions(throttleStatus_e throttleStatus);
|
||||
|
||||
bool isRangeActive(uint8_t auxChannelIndex, channelRange_t *range);
|
||||
void updateActivatedModes(modeActivationCondition_t *modeActivationConditions);
|
||||
|
@ -287,7 +295,8 @@ typedef struct adjustmentProfile_s {
|
|||
bool isAirmodeActive(void);
|
||||
void resetAdjustmentStates(void);
|
||||
void updateAdjustmentStates(adjustmentRange_t *adjustmentRanges);
|
||||
void processRcAdjustments(controlRateConfig_t *controlRateConfig, const struct rxConfig_s *rxConfig);
|
||||
struct rxConfig_s;
|
||||
void processRcAdjustments(controlRateConfig_t *controlRateConfig);
|
||||
|
||||
bool isUsingSticksForArming(void);
|
||||
|
||||
|
@ -295,4 +304,4 @@ int32_t getRcStickDeflection(int32_t axis, uint16_t midrc);
|
|||
bool isModeActivationConditionPresent(const modeActivationCondition_t *modeActivationConditions, boxId_e modeId);
|
||||
struct pidProfile_s;
|
||||
struct motorConfig_s;
|
||||
void useRcControlsConfig(const modeActivationCondition_t *modeActivationConditions, const struct motorConfig_s *motorConfigToUse, struct pidProfile_s *pidProfileToUse);
|
||||
void useRcControlsConfig(const modeActivationCondition_t *modeActivationConditions, struct pidProfile_s *pidProfileToUse);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue