From 56ed140e330b6677d1cc7b30768cc1b86da88ecd Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Sun, 12 Nov 2017 12:49:12 +0000 Subject: [PATCH] Updated to use currentTimeUs, which is time of gyro sampling --- src/main/flight/pid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 88ce802c18..3a5beae970 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -413,9 +413,6 @@ void pidController(const pidProfile_t *pidProfile, const rollAndPitchTrims_t *an static timeUs_t previousTime; // calculate actual deltaT -#ifndef SITL - currentTimeUs = microsISR(); // re-get current time, since there can be variations in timing since scheduler invocation -#endif const float deltaT = currentTimeUs - previousTime; previousTime = currentTimeUs;