dfco checks driver throttle intent (#3832)

This commit is contained in:
Matthew Kennedy 2022-01-24 11:26:39 -08:00 committed by GitHub
parent cb295b7603
commit df1635b5a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ bool DfcoController::getState() const {
}
auto rpm = Sensor::getOrZero(SensorType::Rpm);
const auto [tpsValid, tpsPos] = Sensor::get(SensorType::Tps1);
const auto [tpsValid, tpsPos] = Sensor::get(SensorType::DriverThrottleIntent);
const auto [cltValid, clt] = Sensor::get(SensorType::Clt);
const auto [mapValid, map] = Sensor::get(SensorType::Map);

View File

@ -1359,7 +1359,7 @@ float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance
int16_t coastingFuelCutRpmHigh;+This sets the RPM above which fuel cut is active.;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutRpmLow;+This sets the RPM below which fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutTps;+Throttle position below which fuel cut is active.;"%", 1, 0, 0, 20, 1
int16_t coastingFuelCutTps;+Throttle position below which fuel cut is active. With an electronic throttle enabled, this checks against pedal position.;"%", 1, 0, 0, 20, 1
int16_t coastingFuelCutClt;+Fuel cutoff is disabled when the engine is cold.;"C", 1, 0, -100, 100, 0
int16_t pidExtraForLowRpm;+Increases PID reaction for RPM<target by adding extra percent to PID-error;"%", 1, 0, 0, 100, 0

View File

@ -36,7 +36,7 @@ TEST(fuelCut, coasting) {
float hotClt = engineConfiguration->coastingFuelCutClt + 1;
Sensor::setMockValue(SensorType::Clt, hotClt);
// mock TPS - throttle is opened
Sensor::setMockValue(SensorType::Tps1, 60);
Sensor::setMockValue(SensorType::DriverThrottleIntent, 60);
// set 'running' RPM - just above RpmHigh threshold
Sensor::setMockValue(SensorType::Rpm, engineConfiguration->coastingFuelCutRpmHigh + 1);
// 'advance' time (amount doesn't matter)
@ -54,7 +54,7 @@ TEST(fuelCut, coasting) {
assertEqualsM("inj dur#1 norm", normalInjDuration, engine->injectionDuration);
// 'releasing' the throttle
Sensor::setMockValue(SensorType::Tps1, 0);
Sensor::setMockValue(SensorType::DriverThrottleIntent, 0);
eth.engine.periodicFastCallback();
// Fuel cut-off is enabled now