From ec014c51f5240bcb5dce4399aa7c644db7419e78 Mon Sep 17 00:00:00 2001 From: Mr D - RC Date: Tue, 5 Nov 2024 20:47:17 +0000 Subject: [PATCH] Added uplink RSSI dBm to programming framework --- src/main/programming/logic_condition.c | 8 ++++++++ src/main/programming/logic_condition.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/main/programming/logic_condition.c b/src/main/programming/logic_condition.c index facc595c3f..5b7310b4b1 100644 --- a/src/main/programming/logic_condition.c +++ b/src/main/programming/logic_condition.c @@ -804,6 +804,14 @@ static int logicConditionGetFlightOperandValue(int operand) { #endif break; + case LOGIC_CONDITION_OPERAND_FLIGHT_UPLINK_RSSI_DBM: +#if defined(USE_SERIALRX_CRSF) || defined(USE_RX_MSP) + return rxLinkStatistics.uplinkRSSI; +#else + return 0; +#endif + break; + case LOGIC_CONDITION_OPERAND_FLIGHT_LQ_DOWNLINK: #if defined(USE_SERIALRX_CRSF) || defined(USE_RX_MSP) return rxLinkStatistics.downlinkLQ; diff --git a/src/main/programming/logic_condition.h b/src/main/programming/logic_condition.h index aaa80d51d5..f5653bb68c 100644 --- a/src/main/programming/logic_condition.h +++ b/src/main/programming/logic_condition.h @@ -145,6 +145,7 @@ typedef enum { LOGIC_CONDITION_OPERAND_FLIGHT_BATT_PROFILE, // int // 42 LOGIC_CONDITION_OPERAND_FLIGHT_FLOWN_LOITER_RADIUS, // 43 LOGIC_CONDITION_OPERAND_FLIGHT_LQ_DOWNLINK, // 44 + LOGIC_CONDITION_OPERAND_FLIGHT_UPLINK_RSSI_DBM, // 45 } logicFlightOperands_e; typedef enum {