mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 11:29:56 +03:00
Merge branch 'master' of https://github.com/iNavFlight/inav into submit-gps-fix-estimation
This commit is contained in:
commit
a08e8c4285
218 changed files with 3194 additions and 1437 deletions
|
@ -56,6 +56,7 @@
|
|||
|
||||
#include "io/vtx.h"
|
||||
#include "drivers/vtx_common.h"
|
||||
#include "drivers/light_ws2811strip.h"
|
||||
|
||||
PG_REGISTER_ARRAY_WITH_RESET_FN(logicCondition_t, MAX_LOGIC_CONDITIONS, logicConditions, PG_LOGIC_CONDITIONS, 4);
|
||||
|
||||
|
@ -475,6 +476,17 @@ static int logicConditionCompute(
|
|||
}
|
||||
break;
|
||||
|
||||
#ifdef LED_PIN
|
||||
case LOGIC_CONDITION_LED_PIN_PWM:
|
||||
if (operandA >=0 && operandA <= 100) {
|
||||
ledPinStartPWM((uint8_t)operandA);
|
||||
} else {
|
||||
ledPinStopPWM();
|
||||
}
|
||||
return operandA;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef USE_GPS_FIX_ESTIMATION
|
||||
case LOGIC_CONDITION_DISABLE_GPS_FIX:
|
||||
if (operandA > 0) {
|
||||
|
@ -720,6 +732,10 @@ static int logicConditionGetFlightOperandValue(int operand) {
|
|||
return constrain(attitude.values.pitch / 10, -180, 180);
|
||||
break;
|
||||
|
||||
case LOGIC_CONDITION_OPERAND_FLIGHT_ATTITUDE_YAW: // deg
|
||||
return constrain(attitude.values.yaw / 10, 0, 360);
|
||||
break;
|
||||
|
||||
case LOGIC_CONDITION_OPERAND_FLIGHT_IS_ARMED: // 0/1
|
||||
return ARMING_FLAG(ARMED) ? 1 : 0;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue