|
|
@ -42,6 +42,7 @@ |
|
|
|
#include "navigation/navigation.h" |
|
|
|
#include "sensors/battery.h" |
|
|
|
#include "sensors/pitotmeter.h" |
|
|
|
#include "sensors/rangefinder.h" |
|
|
|
#include "flight/imu.h" |
|
|
|
#include "flight/pid.h" |
|
|
|
#include "drivers/io_port_expander.h" |
|
|
@ -612,6 +613,18 @@ static int logicConditionGetFlightOperandValue(int operand) { |
|
|
|
case LOGIC_CONDITION_OPERAND_FLIGHT_LOITER_RADIUS: |
|
|
|
return getLoiterRadius(navConfig()->fw.loiter_radius); |
|
|
|
|
|
|
|
case LOGIC_CONDITION_OPERAND_FLIGHT_AGL_STATUS: |
|
|
|
return isEstimatedAglTrusted(); |
|
|
|
break; |
|
|
|
|
|
|
|
case LOGIC_CONDITION_OPERAND_FLIGHT_AGL: |
|
|
|
return getEstimatedAglPosition(); |
|
|
|
break; |
|
|
|
|
|
|
|
case LOGIC_CONDITION_OPERAND_FLIGHT_RANGEFINDER_RAW: |
|
|
|
return rangefinderGetLatestRawAltitude(); |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
return 0; |
|
|
|
break; |
|
|
|