From dda662fa861e682a765f3a13841b9c71a59cf8f5 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Thu, 23 Jun 2016 08:16:43 +0100 Subject: [PATCH] Fixed calling of updateRcCommands. --- src/main/mw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/mw.c b/src/main/mw.c index 5a95f1c92..36dcad2a6 100644 --- a/src/main/mw.c +++ b/src/main/mw.c @@ -694,6 +694,8 @@ void subTaskMainSubprocesses(void) { #endif #if defined(BARO) || defined(SONAR) + // updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState + updateRcCommands(); if (sensors(SENSOR_BARO) || sensors(SENSOR_SONAR)) { if (FLIGHT_MODE(BARO_MODE) || FLIGHT_MODE(SONAR_MODE)) { applyAltHold(&masterConfig.airplaneConfig); @@ -874,8 +876,10 @@ void taskUpdateRxMain(void) processRx(); isRXDataNew = true; +#if !defined(BARO) && !defined(SONAR) // updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState updateRcCommands(); +#endif updateLEDs(); #ifdef BARO