1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time

This commit is contained in:
Steve Evans 2020-08-14 16:42:20 +01:00 committed by Steve Evans
parent a63172cc1f
commit ab1baccc66
44 changed files with 1392 additions and 721 deletions

View file

@ -38,6 +38,8 @@
#include "io/gps.h"
#include "scheduler/scheduler.h"
#include "sensors/sensors.h"
#include "sensors/barometer.h"
@ -94,6 +96,7 @@ void calculateEstimatedAltitude(timeUs_t currentTimeUs)
const uint32_t dTime = currentTimeUs - previousTimeUs;
if (dTime < BARO_UPDATE_FREQUENCY_40HZ) {
ignoreTaskExecTime();
return;
}
previousTimeUs = currentTimeUs;
@ -167,7 +170,7 @@ void calculateEstimatedAltitude(timeUs_t currentTimeUs)
#endif
}
DEBUG_SET(DEBUG_ALTITUDE, 0, (int32_t)(100 * gpsTrust));
DEBUG_SET(DEBUG_ALTITUDE, 1, baroAlt);