mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 17:55:30 +03:00
Put execution time at the end
This commit is contained in:
parent
e5a882d861
commit
5989d7b067
1 changed files with 6 additions and 7 deletions
|
@ -860,13 +860,6 @@ void gpsUpdate(timeUs_t currentTimeUs)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
executeTimeUs = micros() - currentTimeUs;
|
|
||||||
|
|
||||||
if (executeTimeUs > gpsStateDurationUs[gpsCurrentState]) {
|
|
||||||
gpsStateDurationUs[gpsCurrentState] = executeTimeUs;
|
|
||||||
}
|
|
||||||
schedulerSetNextStateTime(gpsStateDurationUs[gpsData.state]);
|
|
||||||
|
|
||||||
if (sensors(SENSOR_GPS)) {
|
if (sensors(SENSOR_GPS)) {
|
||||||
updateGpsIndicator(currentTimeUs);
|
updateGpsIndicator(currentTimeUs);
|
||||||
}
|
}
|
||||||
|
@ -893,6 +886,12 @@ void gpsUpdate(timeUs_t currentTimeUs)
|
||||||
} else {
|
} else {
|
||||||
hasFix = false;
|
hasFix = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
executeTimeUs = micros() - currentTimeUs;
|
||||||
|
if (executeTimeUs > gpsStateDurationUs[gpsCurrentState]) {
|
||||||
|
gpsStateDurationUs[gpsCurrentState] = executeTimeUs;
|
||||||
|
}
|
||||||
|
schedulerSetNextStateTime(gpsStateDurationUs[gpsData.state]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gpsNewData(uint16_t c)
|
static void gpsNewData(uint16_t c)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue