From 8689b2d0caab34124617b8bf82596530be9b95ba Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 8 May 2015 07:38:12 +0100 Subject: [PATCH 1/2] OP-1803 Don't report error codes as % --- flight/modules/Receiver/receiver.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flight/modules/Receiver/receiver.c b/flight/modules/Receiver/receiver.c index da26c23be..16f1c95d5 100644 --- a/flight/modules/Receiver/receiver.c +++ b/flight/modules/Receiver/receiver.c @@ -653,14 +653,19 @@ static bool updateRcvrStatus( { extern uint32_t pios_rcvr_group_map[]; bool activity_updated = false; - uint8_t quality; + int8_t quality; quality = PIOS_RCVR_GetQuality(pios_rcvr_group_map[group]); + /* If no driver is detected or any other error then return */ + if (quality < 0) { + return activity_updated; + } + /* Compare with previous sample */ if (quality != fsm->quality) { fsm->quality = quality; - ReceiverStatusQualitySet(&quality); + ReceiverStatusQualitySet(&fsm->quality); activity_updated = true; } From 023f157ba89748472b854f685336a1366ae2f1a9 Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 8 May 2015 07:42:32 +0100 Subject: [PATCH 2/2] OP-1803 Disable untested DSM link quality code --- flight/pios/stm32f10x/pios_dsm.c | 2 +- flight/pios/stm32f4xx/pios_dsm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/pios/stm32f10x/pios_dsm.c b/flight/pios/stm32f10x/pios_dsm.c index a058ee9c2..44fa484be 100644 --- a/flight/pios/stm32f10x/pios_dsm.c +++ b/flight/pios/stm32f10x/pios_dsm.c @@ -35,7 +35,7 @@ #include "pios_dsm_priv.h" // *** UNTESTED CODE *** -#define DSM_LINK_QUALITY +#undef DSM_LINK_QUALITY /* Forward Declarations */ static int32_t PIOS_DSM_Get(uint32_t rcvr_id, uint8_t channel); diff --git a/flight/pios/stm32f4xx/pios_dsm.c b/flight/pios/stm32f4xx/pios_dsm.c index 764bc231b..bdd8244e1 100644 --- a/flight/pios/stm32f4xx/pios_dsm.c +++ b/flight/pios/stm32f4xx/pios_dsm.c @@ -35,7 +35,7 @@ #include "pios_dsm_priv.h" // *** UNTESTED CODE *** -#define DSM_LINK_QUALITY +#undef DSM_LINK_QUALITY #ifndef PIOS_INCLUDE_RTC #error PIOS_INCLUDE_RTC must be used to use DSM