diff --git a/flight/modules/Receiver/receiver.c b/flight/modules/Receiver/receiver.c index 3b2b7e733..532c21c3e 100644 --- a/flight/modules/Receiver/receiver.c +++ b/flight/modules/Receiver/receiver.c @@ -713,14 +713,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; } 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