Merge pull request #2026 from martinbudden/bf_gyro_temperature
Only read gyro temperature if it is actually used
This commit is contained in:
commit
45c4341442
|
@ -703,11 +703,10 @@ void subTaskPidController(void)
|
||||||
|
|
||||||
void subTaskMainSubprocesses(void)
|
void subTaskMainSubprocesses(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
const uint32_t startTime = micros();
|
const uint32_t startTime = micros();
|
||||||
|
|
||||||
// Read out gyro temperature. can use it for something somewhere. maybe get MCU temperature instead? lots of fun possibilities.
|
// Read out gyro temperature if used for telemmetry
|
||||||
if (gyro.dev.temperature) {
|
if (feature(FEATURE_TELEMETRY) && gyro.dev.temperature) {
|
||||||
gyro.dev.temperature(&gyro.dev, &telemTemperature1);
|
gyro.dev.temperature(&gyro.dev, &telemTemperature1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,10 +716,6 @@ void subTaskMainSubprocesses(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GTUNE
|
|
||||||
updateGtuneState();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(BARO) || defined(SONAR)
|
#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();
|
||||||
|
|
Loading…
Reference in New Issue