1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

Added timeUs_t and timeMs_t types

This commit is contained in:
Martin Budden 2016-11-29 15:40:31 +00:00
parent 988027b150
commit 769ccf3311
48 changed files with 429 additions and 370 deletions

View file

@ -579,12 +579,12 @@ void imuUpdateAccelerometer(void)
#endif
}
void imuUpdateAttitude(uint32_t currentTime)
void imuUpdateAttitude(timeUs_t currentTimeUs)
{
/* Calculate dT */
static uint32_t previousIMUUpdateTime;
const float dT = (currentTime - previousIMUUpdateTime) * 1e-6;
previousIMUUpdateTime = currentTime;
static timeUs_t previousIMUUpdateTimeUs;
const float dT = (currentTimeUs - previousIMUUpdateTimeUs) * 1e-6;
previousIMUUpdateTimeUs = currentTimeUs;
if (sensors(SENSOR_ACC) && isAccelUpdatedAtLeastOnce) {
#ifdef HIL