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:
parent
988027b150
commit
769ccf3311
48 changed files with 429 additions and 370 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue