mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Updated to use currentTimeUs, which is time of gyro sampling
This commit is contained in:
parent
0491eae52e
commit
56ed140e33
1 changed files with 0 additions and 3 deletions
|
@ -413,9 +413,6 @@ void pidController(const pidProfile_t *pidProfile, const rollAndPitchTrims_t *an
|
||||||
static timeUs_t previousTime;
|
static timeUs_t previousTime;
|
||||||
|
|
||||||
// calculate actual deltaT
|
// 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;
|
const float deltaT = currentTimeUs - previousTime;
|
||||||
previousTime = currentTimeUs;
|
previousTime = currentTimeUs;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue