FC Core: Remove conditional pidUpdateCountDown

This commit is contained in:
Andrey Mironov 2018-03-01 21:32:36 +13:00 committed by AJ Christensen
parent dc58ddebd6
commit 685dd05479
1 changed files with 1 additions and 10 deletions

View File

@ -926,15 +926,6 @@ static void subTaskMotorUpdate(timeUs_t currentTimeUs)
DEBUG_SET(DEBUG_PIDLOOP, 2, micros() - startTime); 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 // Function for loop trigger
void taskMainPidLoop(timeUs_t currentTimeUs) void taskMainPidLoop(timeUs_t currentTimeUs)
{ {
@ -955,7 +946,7 @@ void taskMainPidLoop(timeUs_t currentTimeUs)
if (pidUpdateCountdown) { if (pidUpdateCountdown) {
pidUpdateCountdown--; pidUpdateCountdown--;
} else { } else {
pidUpdateCountdown = setPidUpdateCountDown(); pidUpdateCountdown = pidConfig()->pid_process_denom - 1;
subTaskPidController(currentTimeUs); subTaskPidController(currentTimeUs);
subTaskMotorUpdate(currentTimeUs); subTaskMotorUpdate(currentTimeUs);
subTaskMainSubprocesses(currentTimeUs); subTaskMainSubprocesses(currentTimeUs);