diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index 93a34403f..e3a769a83 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -392,13 +392,13 @@ static bool canUpdateVTX(void) /* * processRx called from taskUpdateRxMain */ -void processRx(timeUs_t currentTimeUs) +bool processRx(timeUs_t currentTimeUs) { static bool armedBeeperOn = false; static bool airmodeIsActivated; if (!calculateRxChannelsAndUpdateFailsafe(currentTimeUs)) { - return; + return false; } // in 3D mode, we need to be able to disarm by switch at any time @@ -600,6 +600,8 @@ void processRx(timeUs_t currentTimeUs) handleVTXControlButton(); } #endif + + return true; } static void subTaskPidController(timeUs_t currentTimeUs) diff --git a/src/main/fc/fc_core.h b/src/main/fc/fc_core.h index a136cd73a..6d215beab 100644 --- a/src/main/fc/fc_core.h +++ b/src/main/fc/fc_core.h @@ -42,7 +42,7 @@ void resetArmingDisabled(void); void disarm(void); void tryArm(void); -void processRx(timeUs_t currentTimeUs); +bool processRx(timeUs_t currentTimeUs); void updateArmingStatus(void); void updateRcCommands(void); diff --git a/src/main/fc/fc_tasks.c b/src/main/fc/fc_tasks.c index 9cb0a8088..a7cfc9496 100644 --- a/src/main/fc/fc_tasks.c +++ b/src/main/fc/fc_tasks.c @@ -132,7 +132,10 @@ static void taskUpdateAccelerometer(timeUs_t currentTimeUs) static void taskUpdateRxMain(timeUs_t currentTimeUs) { - processRx(currentTimeUs); + if (!processRx(currentTimeUs)) { + return; + } + isRXDataNew = true; #if !defined(USE_ALT_HOLD)