parent
7dff2a24e2
commit
9353e7904a
|
@ -279,7 +279,7 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
|
|||
}
|
||||
// increase the errorAmpCoef slowly to restore the process correctly after the PID reset
|
||||
// todo: move restoreAfterPidResetTimeUs to idle?
|
||||
int32_t timeSincePidResetUs = nowUs - restoreAfterPidResetTimeUs;
|
||||
efitimeus_t timeSincePidResetUs = nowUs - restoreAfterPidResetTimeUs;
|
||||
// todo: add 'pidAfterResetDampingPeriodMs' setting
|
||||
errorAmpCoef = interpolateClamped(0, 0, MS2US(/*engineConfiguration->pidAfterResetDampingPeriodMs*/1000), errorAmpCoef, timeSincePidResetUs);
|
||||
// If errorAmpCoef > 1.0, then PID thinks that RPM is lower than it is, and controls IAC more aggressively
|
||||
|
|
|
@ -69,7 +69,7 @@ void DynoView::update(vssSrc src) {
|
|||
void DynoView::updateAcceleration(efitimeus_t deltaTime, float deltaSpeed) {
|
||||
// todo: explain why do we compare float with zero without threshold?
|
||||
if (deltaSpeed != 0.0) {
|
||||
acceleration = ((deltaSpeed / 3.6) / ((uint32_t)deltaTime / US_PER_SECOND_F));
|
||||
acceleration = ((deltaSpeed / 3.6) / (deltaTime / US_PER_SECOND_F));
|
||||
if (direction) {
|
||||
//decceleration
|
||||
acceleration *= -1;
|
||||
|
|
Loading…
Reference in New Issue