mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-15 04:15:38 +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;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LOGIC_CONDITION_SET_HEADING_TARGET:
|
||||||
|
temporaryValue = CENTIDEGREES_TO_DEGREES(wrap_36000(DEGREES_TO_CENTIDEGREES(operandA)));
|
||||||
|
updateHeadingHoldTarget(temporaryValue);
|
||||||
|
return temporaryValue;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -68,7 +68,8 @@ typedef enum {
|
||||||
LOGIC_CONDITION_MAP_INPUT = 36,
|
LOGIC_CONDITION_MAP_INPUT = 36,
|
||||||
LOGIC_CONDITION_MAP_OUTPUT = 37,
|
LOGIC_CONDITION_MAP_OUTPUT = 37,
|
||||||
LOGIC_CONDITION_RC_CHANNEL_OVERRIDE = 38,
|
LOGIC_CONDITION_RC_CHANNEL_OVERRIDE = 38,
|
||||||
LOGIC_CONDITION_LAST = 39,
|
LOGIC_CONDITION_SET_HEADING_TARGET = 39,
|
||||||
|
LOGIC_CONDITION_LAST = 40,
|
||||||
} logicOperation_e;
|
} logicOperation_e;
|
||||||
|
|
||||||
typedef enum logicOperandType_s {
|
typedef enum logicOperandType_s {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue