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:
parent
173ef632d2
commit
dda662fa86
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue