ETB calibration compatibility notes from 2022 (#320)

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-12-25 20:50:47 -05:00 committed by GitHub
parent 09c867ee06
commit 7bc59adb83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 12 deletions

View File

@ -323,21 +323,11 @@ expected<percent_t> EtbController::getSetpointEtb() {
}
float minPosition = engineConfiguration->etbMinimumPosition;
if (minPosition < 0.01) {
// compatibility with legacy tunes, todo: remove in Nov of 2022
minPosition = 1;
}
// Keep the throttle just barely off the lower stop, and less than the user-configured maximum
float maxPosition = engineConfiguration->etbMaximumPosition;
if (maxPosition < 70) {
// compatibility with legacy tunes, todo: remove in Aug of 2022
maxPosition = 100;
} else {
// Don't allow max position over 100
maxPosition = minF(maxPosition, 100);
}
// Don't allow max position over 100
maxPosition = minF(maxPosition, 100);
targetPosition = clampF(minPosition, targetPosition, maxPosition);
etbCurrentAdjustedTarget = targetPosition;