1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Dshot RPM Telemetry Refactoring (#13012)

This commit is contained in:
Jan Post 2023-12-03 05:16:35 +01:00 committed by GitHub
parent 0c9d7e6c50
commit 5769b3021e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 166 additions and 112 deletions

View file

@ -711,8 +711,8 @@ void gyroSetTargetLooptime(uint8_t pidDenom)
{
activePidLoopDenom = pidDenom;
if (gyro.sampleRateHz) {
gyro.sampleLooptime = 1e6 / gyro.sampleRateHz;
gyro.targetLooptime = activePidLoopDenom * 1e6 / gyro.sampleRateHz;
gyro.sampleLooptime = 1e6f / gyro.sampleRateHz;
gyro.targetLooptime = activePidLoopDenom * 1e6f / gyro.sampleRateHz;
} else {
gyro.sampleLooptime = 0;
gyro.targetLooptime = 0;