mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
FC Core: Remove conditional pidUpdateCountDown
This commit is contained in:
parent
dc58ddebd6
commit
685dd05479
1 changed files with 1 additions and 10 deletions
|
@ -926,15 +926,6 @@ static void subTaskMotorUpdate(timeUs_t currentTimeUs)
|
|||
DEBUG_SET(DEBUG_PIDLOOP, 2, micros() - startTime);
|
||||
}
|
||||
|
||||
uint8_t setPidUpdateCountDown(void)
|
||||
{
|
||||
if (gyroConfig()->gyro_soft_lpf_hz) {
|
||||
return pidConfig()->pid_process_denom - 1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Function for loop trigger
|
||||
void taskMainPidLoop(timeUs_t currentTimeUs)
|
||||
{
|
||||
|
@ -955,7 +946,7 @@ void taskMainPidLoop(timeUs_t currentTimeUs)
|
|||
if (pidUpdateCountdown) {
|
||||
pidUpdateCountdown--;
|
||||
} else {
|
||||
pidUpdateCountdown = setPidUpdateCountDown();
|
||||
pidUpdateCountdown = pidConfig()->pid_process_denom - 1;
|
||||
subTaskPidController(currentTimeUs);
|
||||
subTaskMotorUpdate(currentTimeUs);
|
||||
subTaskMainSubprocesses(currentTimeUs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue