Weird VAG: DC motor idle valve not ETB #1637
This commit is contained in:
parent
bb3648bba5
commit
d5739815b4
|
@ -99,8 +99,8 @@ static bool startupPositionError = false;
|
|||
|
||||
#define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 5
|
||||
|
||||
static SensorType indexToTpsSensor(size_t index, bool volkswagenEtbIdle) {
|
||||
if (volkswagenEtbIdle) {
|
||||
static SensorType indexToTpsSensor(size_t index, bool dcMotorIdleValve) {
|
||||
if (dcMotorIdleValve) {
|
||||
return SensorType::Tps2;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ expected<percent_t> EtbController::getSetpoint() const {
|
|||
|
||||
// VW ETB idle mode uses an ETB only for idle (a mini-ETB sets the lower stop, and a normal cable
|
||||
// can pull the throttle up off the stop.), so we directly control the throttle with the idle position.
|
||||
if (CONFIG(volkswagenEtbIdle)) {
|
||||
if (CONFIG(dcMotorIdleValve)) {
|
||||
return clampF(0, m_idlePosition, 100);
|
||||
}
|
||||
|
||||
|
@ -748,13 +748,13 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
// If you don't have a pedal (or VW idle valve mode), we have no business here.
|
||||
if (!CONFIG(volkswagenEtbIdle) && !Sensor::hasSensor(SensorType::AcceleratorPedalPrimary)) {
|
||||
if (!CONFIG(dcMotorIdleValve) && !Sensor::hasSensor(SensorType::AcceleratorPedalPrimary)) {
|
||||
return;
|
||||
}
|
||||
|
||||
pedal2tpsMap.init(config->pedalToTpsTable, config->pedalToTpsPedalBins, config->pedalToTpsRpmBins);
|
||||
|
||||
if (CONFIG(volkswagenEtbIdle)) {
|
||||
if (CONFIG(dcMotorIdleValve)) {
|
||||
engine->etbActualCount = 1;
|
||||
} else {
|
||||
engine->etbActualCount = Sensor::hasSensor(SensorType::Tps2) ? 2 : 1;
|
||||
|
@ -766,7 +766,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// If this motor is actually set up, init the etb
|
||||
if (motor)
|
||||
{
|
||||
auto positionSensor = indexToTpsSensor(i, CONFIG(volkswagenEtbIdle));
|
||||
auto positionSensor = indexToTpsSensor(i, CONFIG(dcMotorIdleValve));
|
||||
engine->etbControllers[i]->init(positionSensor, motor, i, &engineConfiguration->etb, &pedal2tpsMap);
|
||||
INJECT_ENGINE_REFERENCE(engine->etbControllers[i]);
|
||||
}
|
||||
|
|
|
@ -826,7 +826,7 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
|
|||
bit enableInnovateLC2
|
||||
bit showHumanReadableWarning
|
||||
bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.;
|
||||
bit volkswagenEtbIdle
|
||||
bit dcMotorIdleValve;+Used on some German vehicles around late 90s: cable-operated throttle and DC motor idle air valve.\nSet the primary TPS to the cable-operated throttle's sensor\nSet the secondary TPS to the mini ETB's position sensor(s).
|
||||
bit unusedBit_251_12
|
||||
bit unusedBit_251_13
|
||||
bit unusedBit_251_14
|
||||
|
|
|
@ -83,13 +83,13 @@ TEST(etb, initializationDualThrottle) {
|
|||
doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
TEST(etb, initializationVolkswagenEtbIdleMode) {
|
||||
TEST(etb, initializationDcMotorIdleValveMode) {
|
||||
StrictMock<MockEtb> mocks[ETB_COUNT];
|
||||
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
|
||||
// Enable VW idle mode
|
||||
engineConfiguration->volkswagenEtbIdle = true;
|
||||
engineConfiguration->dcMotorIdleValve = true;
|
||||
|
||||
for (int i = 0; i < ETB_COUNT; i++) {
|
||||
engine->etbControllers[i] = &mocks[i];
|
||||
|
@ -231,7 +231,7 @@ TEST(etb, idleVolkswagenMode) {
|
|||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
|
||||
// In this mode the idle position should be passed thru as the setpoint directly
|
||||
engineConfiguration->volkswagenEtbIdle = true;
|
||||
engineConfiguration->dcMotorIdleValve = true;
|
||||
|
||||
EtbController etb;
|
||||
INJECT_ENGINE_REFERENCE(&etb);
|
||||
|
|
Loading…
Reference in New Issue