1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Fixed calling of updateRcCommands.

This commit is contained in:
Martin Budden 2016-06-23 08:16:43 +01:00
parent 173ef632d2
commit dda662fa86

View file

@ -694,6 +694,8 @@ void subTaskMainSubprocesses(void) {
#endif #endif
#if defined(BARO) || defined(SONAR) #if defined(BARO) || defined(SONAR)
// updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState
updateRcCommands();
if (sensors(SENSOR_BARO) || sensors(SENSOR_SONAR)) { if (sensors(SENSOR_BARO) || sensors(SENSOR_SONAR)) {
if (FLIGHT_MODE(BARO_MODE) || FLIGHT_MODE(SONAR_MODE)) { if (FLIGHT_MODE(BARO_MODE) || FLIGHT_MODE(SONAR_MODE)) {
applyAltHold(&masterConfig.airplaneConfig); applyAltHold(&masterConfig.airplaneConfig);
@ -874,8 +876,10 @@ void taskUpdateRxMain(void)
processRx(); processRx();
isRXDataNew = true; isRXDataNew = true;
#if !defined(BARO) && !defined(SONAR)
// updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState // updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState
updateRcCommands(); updateRcCommands();
#endif
updateLEDs(); updateLEDs();
#ifdef BARO #ifdef BARO