antilag: TPS vs APS/PPS vs driver intent #4917
This commit is contained in:
parent
2d586729ab
commit
f685713a19
|
@ -54,10 +54,10 @@ bool AntilagSystemBase::isALSMaxCLTCondition() const {
|
|||
return engineConfiguration->ALSMaxCLT > clt;
|
||||
}
|
||||
|
||||
bool AntilagSystemBase::isALSMaxTPSCondition() const {
|
||||
int tps = Sensor::getOrZero(SensorType::Tps1);
|
||||
bool AntilagSystemBase::isALSMaxThrottleIntentCondition() const {
|
||||
int throttleIntent = Sensor::getOrZero(SensorType::DriverThrottleIntent);
|
||||
|
||||
return engineConfiguration->ALSMaxTPS > tps;
|
||||
return engineConfiguration->ALSMaxTPS > throttleIntent;
|
||||
}
|
||||
|
||||
bool AntilagSystemBase::isAntilagConditionMet() {
|
||||
|
@ -66,18 +66,19 @@ bool AntilagSystemBase::isAntilagConditionMet() {
|
|||
ALSMaxRPMCondition = isALSMaxRPMCondition();
|
||||
ALSMinCLTCondition = isALSMinCLTCondition();
|
||||
ALSMaxCLTCondition = isALSMaxCLTCondition();
|
||||
ALSMaxTPSCondition = isALSMaxTPSCondition();
|
||||
ALSMaxThrottleIntentCondition = isALSMaxThrottleIntentCondition();
|
||||
ALSSwitchCondition = isInsideALSSwitchCondition();
|
||||
|
||||
return ALSMinRPMCondition && ALSMaxRPMCondition && ALSMinCLTCondition && ALSMaxCLTCondition && ALSMaxTPSCondition && ALSSwitchCondition;
|
||||
return ALSMinRPMCondition &&
|
||||
ALSMaxRPMCondition &&
|
||||
ALSMinCLTCondition &&
|
||||
ALSMaxCLTCondition &&
|
||||
ALSMaxThrottleIntentCondition &&
|
||||
ALSSwitchCondition;
|
||||
}
|
||||
|
||||
void AntilagSystemBase::update() {
|
||||
if (!engineConfiguration->antiLagEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
isAntilagCondition = isAntilagConditionMet();
|
||||
isAntilagCondition = engineConfiguration->antiLagEnabled && isAntilagConditionMet();
|
||||
}
|
||||
|
||||
#endif /* EFI_ANTILAG_SYSTEM */
|
||||
|
|
|
@ -20,7 +20,8 @@ public:
|
|||
bool isALSMaxRPMCondition() const;
|
||||
bool isALSMinCLTCondition() const;
|
||||
bool isALSMaxCLTCondition() const;
|
||||
bool isALSMaxTPSCondition() const;
|
||||
bool isAntilagConditionMet();
|
||||
bool isALSMaxThrottleIntentCondition() const;
|
||||
bool isInsideALSSwitchCondition();
|
||||
/* enabled and all conditions above */
|
||||
bool isAntilagConditionMet();
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ bit ALSMinRPMCondition
|
|||
bit ALSMaxRPMCondition
|
||||
bit ALSMinCLTCondition
|
||||
bit ALSMaxCLTCondition
|
||||
bit ALSMaxTPSCondition
|
||||
bit ALSMaxThrottleIntentCondition
|
||||
bit isALSSwitchActivated
|
||||
bit ALSActivatePinState
|
||||
bit ALSSwitchCondition
|
||||
|
|
Loading…
Reference in New Issue