Merge pull request #566 from martinbudden/bf_issue_522

Fixed calling of updateRcCommands - testing required
This commit is contained in:
J Blackman 2016-06-27 05:52:00 +10:00 committed by GitHub
commit 3425d6879d
1 changed files with 4 additions and 0 deletions

View File

@ -698,6 +698,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);
@ -878,8 +880,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