mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 23:05:17 +03:00
Allow Logic Conditions to override RC channels
This commit is contained in:
parent
cb1dd8d039
commit
9dea44a4da
3 changed files with 39 additions and 3 deletions
|
@ -67,7 +67,8 @@ typedef enum {
|
|||
LOGIC_CONDITION_TAN = 35,
|
||||
LOGIC_CONDITION_MAP_INPUT = 36,
|
||||
LOGIC_CONDITION_MAP_OUTPUT = 37,
|
||||
LOGIC_CONDITION_LAST = 38,
|
||||
LOGIC_CONDITION_RC_CHANNEL_OVERRIDE = 38,
|
||||
LOGIC_CONDITION_LAST = 39,
|
||||
} logicOperation_e;
|
||||
|
||||
typedef enum logicOperandType_s {
|
||||
|
@ -141,6 +142,7 @@ typedef enum {
|
|||
LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_INVERT_YAW = (1 << 5),
|
||||
LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_THROTTLE = (1 << 6),
|
||||
LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_OSD_LAYOUT = (1 << 7),
|
||||
LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_RC_CHANNEL = (1 << 8),
|
||||
} logicConditionsGlobalFlags_t;
|
||||
|
||||
typedef enum {
|
||||
|
@ -168,6 +170,11 @@ typedef struct logicConditionState_s {
|
|||
uint8_t flags;
|
||||
} logicConditionState_t;
|
||||
|
||||
typedef struct rcChannelOverride_s {
|
||||
uint8_t active;
|
||||
int value;
|
||||
} rcChannelOverride_t;
|
||||
|
||||
extern int logicConditionValuesByType[LOGIC_CONDITION_LAST];
|
||||
extern uint64_t logicConditionsGlobalFlags;
|
||||
|
||||
|
@ -184,4 +191,5 @@ void logicConditionUpdateTask(timeUs_t currentTimeUs);
|
|||
void logicConditionReset(void);
|
||||
|
||||
float getThrottleScale(float globalThrottleScale);
|
||||
int16_t getRcCommandOverride(int16_t command[], uint8_t axis);
|
||||
int16_t getRcCommandOverride(int16_t command[], uint8_t axis);
|
||||
int16_t getRcChannelOverride(uint8_t channel, int16_t originalValue);
|
Loading…
Add table
Add a link
Reference in a new issue