Merge pull request #2026 from martinbudden/bf_gyro_temperature

Only read gyro temperature if it is actually used
This commit is contained in:
borisbstyle 2017-01-06 12:40:01 +01:00 committed by GitHub
commit 45c4341442
1 changed files with 2 additions and 7 deletions

View File

@ -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();