mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +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;
|
||||
}
|
||||
|
||||
executeTimeUs = micros() - currentTimeUs;
|
||||
|
||||
if (executeTimeUs > gpsStateDurationUs[gpsCurrentState]) {
|
||||
gpsStateDurationUs[gpsCurrentState] = executeTimeUs;
|
||||
}
|
||||
schedulerSetNextStateTime(gpsStateDurationUs[gpsData.state]);
|
||||
|
||||
if (sensors(SENSOR_GPS)) {
|
||||
updateGpsIndicator(currentTimeUs);
|
||||
}
|
||||
|
@ -893,6 +886,12 @@ void gpsUpdate(timeUs_t currentTimeUs)
|
|||
} else {
|
||||
hasFix = false;
|
||||
}
|
||||
|
||||
executeTimeUs = micros() - currentTimeUs;
|
||||
if (executeTimeUs > gpsStateDurationUs[gpsCurrentState]) {
|
||||
gpsStateDurationUs[gpsCurrentState] = executeTimeUs;
|
||||
}
|
||||
schedulerSetNextStateTime(gpsStateDurationUs[gpsData.state]);
|
||||
}
|
||||
|
||||
static void gpsNewData(uint16_t c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue