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)
|
||||
{
|
||||
|
||||
const uint32_t startTime = micros();
|
||||
|
||||
// Read out gyro temperature. can use it for something somewhere. maybe get MCU temperature instead? lots of fun possibilities.
|
||||
if (gyro.dev.temperature) {
|
||||
// Read out gyro temperature if used for telemmetry
|
||||
if (feature(FEATURE_TELEMETRY) && gyro.dev.temperature) {
|
||||
gyro.dev.temperature(&gyro.dev, &telemTemperature1);
|
||||
}
|
||||
|
||||
|
@ -717,10 +716,6 @@ void subTaskMainSubprocesses(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef GTUNE
|
||||
updateGtuneState();
|
||||
#endif
|
||||
|
||||
#if defined(BARO) || defined(SONAR)
|
||||
// updateRcCommands sets rcCommand, which is needed by updateAltHoldState and updateSonarAltHoldState
|
||||
updateRcCommands();
|
||||
|
|
Loading…
Reference in New Issue