ETB duty cycle jitter #4833

This commit is contained in:
Andrey 2022-11-29 12:39:47 -05:00
parent 82a3074cbd
commit 5f7ba304bf
1 changed files with 1 additions and 1 deletions

View File

@ -518,7 +518,7 @@ expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t obs
float output = m_pid.getOutput(target, observation, etbPeriodSeconds);
etbDutyAverage = m_dutyAverage.average(output);
etbDutyAverage = m_dutyRocAverage.average(prevOutput - output);
etbDutyRateOfChange = m_dutyRocAverage.average(output - prevOutput);
prevOutput = output;
// seems good enough to simply check for both TPS sensors