1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Merge pull request #7935 from etracer65/dshot_command_packet_sequence

Refactor dshot command output scheduling logic
This commit is contained in:
Michael Keller 2019-04-14 23:25:33 +12:00 committed by GitHub
commit b4286c6ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 103 additions and 48 deletions

View file

@ -34,6 +34,7 @@
#include "config/config_reset.h"
#include "drivers/pwm_output.h"
#include "drivers/sound_beeper.h"
#include "drivers/time.h"
@ -222,6 +223,9 @@ static void pidSetTargetLooptime(uint32_t pidLooptime)
targetPidLooptime = pidLooptime;
dT = targetPidLooptime * 1e-6f;
pidFrequency = 1.0f / dT;
#ifdef USE_DSHOT
setDshotPidLoopTime(targetPidLooptime);
#endif
}
static FAST_RAM float itermAccelerator = 1.0f;