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:
commit
b4286c6ac9
5 changed files with 103 additions and 48 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue