Update mw.c

do not include serial nor telemetry handler in cycletime calculation
This commit is contained in:
Trey Marc 2014-06-06 12:53:31 +02:00
parent d25564e26b
commit ea3f4cc3e4
1 changed files with 2 additions and 2 deletions

View File

@ -824,12 +824,12 @@ void loop(void)
loopTime = currentTime + mcfg.looptime;
computeIMU();
annexCode();
// Measure loop rate just afer reading the sensors
currentTime = micros();
cycleTime = (int32_t)(currentTime - previousTime);
previousTime = currentTime;
// non IMU critical, temeperatur, serialcom
annexCode();
#ifdef MAG
if (sensors(SENSOR_MAG)) {
if (abs(rcCommand[YAW]) < 70 && f.MAG_MODE) {