mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-14 20:10:15 +03:00
Adds heading target logic condition
- allows for a slider/global-var to set the desired heading - addresses issue #6642
This commit is contained in:
parent
ba3d0ab5b4
commit
0b13c2cd8d
2 changed files with 8 additions and 1 deletions
|
@ -317,6 +317,12 @@ static int logicConditionCompute(
|
|||
return true;
|
||||
break;
|
||||
|
||||
case LOGIC_CONDITION_SET_HEADING_TARGET:
|
||||
temporaryValue = CENTIDEGREES_TO_DEGREES(wrap_36000(DEGREES_TO_CENTIDEGREES(operandA)));
|
||||
updateHeadingHoldTarget(temporaryValue);
|
||||
return temporaryValue;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
|
|
|
@ -68,7 +68,8 @@ typedef enum {
|
|||
LOGIC_CONDITION_MAP_INPUT = 36,
|
||||
LOGIC_CONDITION_MAP_OUTPUT = 37,
|
||||
LOGIC_CONDITION_RC_CHANNEL_OVERRIDE = 38,
|
||||
LOGIC_CONDITION_LAST = 39,
|
||||
LOGIC_CONDITION_SET_HEADING_TARGET = 39,
|
||||
LOGIC_CONDITION_LAST = 40,
|
||||
} logicOperation_e;
|
||||
|
||||
typedef enum logicOperandType_s {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue