1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Updated to use currentTimeUs, which is time of gyro sampling

This commit is contained in:
Martin Budden 2017-11-12 12:49:12 +00:00
parent 0491eae52e
commit 56ed140e33

View file

@ -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;