Revert "avoid long -> float"

This reverts commit 37ad226a3d.
This commit is contained in:
Andrey 2024-05-12 10:19:49 -04:00
parent 7dff2a24e2
commit 9353e7904a
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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;