mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 11:29:56 +03:00
Removed constrain min and max as they are unnecessary
This commit is contained in:
parent
bdc83e4e0e
commit
2f00540c60
3 changed files with 5 additions and 17 deletions
|
@ -76,10 +76,8 @@ IPF can be edited using INAV Configurator user interface, of via CLI
|
||||||
| 40 | MOD | Divide `Operand A` by `Operand B` and returns the remainder |
|
| 40 | MOD | Divide `Operand A` by `Operand B` and returns the remainder |
|
||||||
| 41 | LOITER_RADIUS_OVERRIDE | Sets the loiter radius to `Operand A` [`0` : `100000`] in cm. If the value is lower than the loiter radius set in the **Advanced Tuning**, that will be used. |
|
| 41 | LOITER_RADIUS_OVERRIDE | Sets the loiter radius to `Operand A` [`0` : `100000`] in cm. If the value is lower than the loiter radius set in the **Advanced Tuning**, that will be used. |
|
||||||
| 42 | SET_PROFILE | Sets the active config profile (PIDFF/Rates/Filters/etc) to `Operand A`. `Operand A` must be a valid profile number, currently from 1 to 3. If not, the profile will not change |
|
| 42 | SET_PROFILE | Sets the active config profile (PIDFF/Rates/Filters/etc) to `Operand A`. `Operand A` must be a valid profile number, currently from 1 to 3. If not, the profile will not change |
|
||||||
| 43 | CONSTRAIN_MIN | Ensures that `Operand A` cannot be less than `Operand B` |
|
| 43 | MIN | Finds the lowest value of `Operand A` and `Operand B` |
|
||||||
| 44 | CONSTRAIN_MAX | Ensures that `Operand A` cannot be greater than `Operand B` |
|
| 44 | MAX | Finds the highest value of `Operand A` and `Operand B` |
|
||||||
| 45 | MIN | Finds the lowest value of `Operand A` and `Operand B` |
|
|
||||||
| 46 | MAX | Finds the highest value of `Operand A` and `Operand B` |
|
|
||||||
|
|
||||||
### Operands
|
### Operands
|
||||||
|
|
||||||
|
|
|
@ -304,14 +304,6 @@ static int logicConditionCompute(
|
||||||
return tan_approx(DEGREES_TO_RADIANS(operandA)) * temporaryValue;
|
return tan_approx(DEGREES_TO_RADIANS(operandA)) * temporaryValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LOGIC_CONDITION_CONSTRAIN_MIN:
|
|
||||||
return (operandA < operandB) ? operandB : operandA;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOGIC_CONDITION_CONSTRAIN_MAX:
|
|
||||||
return (operandA > operandB) ? operandB : operandA;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOGIC_CONDITION_MIN:
|
case LOGIC_CONDITION_MIN:
|
||||||
return (operandA < operandB) ? operandA : operandB;
|
return (operandA < operandB) ? operandA : operandB;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -72,11 +72,9 @@ typedef enum {
|
||||||
LOGIC_CONDITION_MODULUS = 40,
|
LOGIC_CONDITION_MODULUS = 40,
|
||||||
LOGIC_CONDITION_LOITER_OVERRIDE = 41,
|
LOGIC_CONDITION_LOITER_OVERRIDE = 41,
|
||||||
LOGIC_CONDITION_SET_PROFILE = 42,
|
LOGIC_CONDITION_SET_PROFILE = 42,
|
||||||
LOGIC_CONDITION_CONSTRAIN_MIN = 43,
|
LOGIC_CONDITION_MIN = 43,
|
||||||
LOGIC_CONDITION_CONSTRAIN_MAX = 44,
|
LOGIC_CONDITION_MAX = 44,
|
||||||
LOGIC_CONDITION_MIN = 45,
|
LOGIC_CONDITION_LAST = 45,
|
||||||
LOGIC_CONDITION_MAX = 46,
|
|
||||||
LOGIC_CONDITION_LAST = 47,
|
|
||||||
} logicOperation_e;
|
} logicOperation_e;
|
||||||
|
|
||||||
typedef enum logicOperandType_s {
|
typedef enum logicOperandType_s {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue