From 4e6077ca2a4c1e0a09b45204657535ebf3217e2f Mon Sep 17 00:00:00 2001 From: Brian Webb Date: Mon, 4 Sep 2017 12:16:48 -0700 Subject: [PATCH] LP-548 Removes OPLinkReceiver from coptercontrol and fixes setting of OPLinkReceiver RSSI and quality on revolution and sparky2. --- flight/pios/common/pios_oplinkrcvr.c | 6 +++--- flight/targets/boards/coptercontrol/firmware/Makefile | 2 -- .../targets/boards/coptercontrol/firmware/inc/pios_config.h | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flight/pios/common/pios_oplinkrcvr.c b/flight/pios/common/pios_oplinkrcvr.c index fe1dd85f4..427285561 100644 --- a/flight/pios/common/pios_oplinkrcvr.c +++ b/flight/pios/common/pios_oplinkrcvr.c @@ -86,10 +86,10 @@ static void PIOS_oplinkrcvr_ppm_callback(uint32_t oplinkrcvr_id, const int16_t * // Update the RSSI and quality fields. int8_t rssi; - OPLinkReceiverRSSIGet(&rssi); + OPLinkStatusRSSIGet(&rssi); oplinkrcvr_dev->oplinkreceiverdata.RSSI = rssi; - uint8_t quality; - OPLinkReceiverLinkQualityGet(&quality); + uint16_t quality; + OPLinkStatusLinkQualityGet(&quality); // Link quality is 0-128, so scale it down to 0-100 oplinkrcvr_dev->oplinkreceiverdata.LinkQuality = quality * 100 / 128; diff --git a/flight/targets/boards/coptercontrol/firmware/Makefile b/flight/targets/boards/coptercontrol/firmware/Makefile index 43efd7591..86539ebfd 100644 --- a/flight/targets/boards/coptercontrol/firmware/Makefile +++ b/flight/targets/boards/coptercontrol/firmware/Makefile @@ -133,8 +133,6 @@ ifndef TESTAPP SRC += $(FLIGHT_UAVOBJ_DIR)/txpidsettings.c SRC += $(FLIGHT_UAVOBJ_DIR)/txpidstatus.c SRC += $(FLIGHT_UAVOBJ_DIR)/mpugyroaccelsettings.c - SRC += $(FLIGHT_UAVOBJ_DIR)/gcsreceiver.c - SRC += $(FLIGHT_UAVOBJ_DIR)/oplinkreceiver.c # Command line option for Gcsreceiver module ifeq ($(GCSRECEIVER), YES) SRC += $(FLIGHT_UAVOBJ_DIR)/gcsreceiver.c diff --git a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h index b5d3a4d32..51ffcdc87 100644 --- a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h +++ b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h @@ -107,8 +107,8 @@ #define PIOS_INCLUDE_SRXL #define PIOS_INCLUDE_HOTT #define PIOS_INCLUDE_IBUS -#define PIOS_INCLUDE_GCSRCVR -#define PIOS_INCLUDE_OPLINKRCVR +/* #define PIOS_INCLUDE_GCSRCVR */ +/* #define PIOS_INCLUDE_OPLINKRCVR */ /* PIOS abstract receiver interface */ #define PIOS_INCLUDE_RCVR