Three wire idle air valve #1122

ugly but should work to begin with
This commit is contained in:
rusefi 2020-02-04 01:22:04 -05:00
parent c4c28431f2
commit 6888b09c53
3 changed files with 4 additions and 0 deletions

View File

@ -575,6 +575,8 @@ void initIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/** /**
* Start PWM for idleValvePin * Start PWM for idleValvePin
*/ */
// todo: even for double-solenoid mode we can probably use same single SimplePWM
// todo: open question why do we pass 'OutputPin' into 'startSimplePwmExt' if we have custom applyIdleSolenoidPinState listener anyway?
startSimplePwmExt(&idleSolenoid, "Idle Valve", startSimplePwmExt(&idleSolenoid, "Idle Valve",
&engine->executor, &engine->executor,
CONFIG(idle).solenoidPin, &enginePins.idleSolenoidPin, CONFIG(idle).solenoidPin, &enginePins.idleSolenoidPin,

View File

@ -135,6 +135,7 @@ void EnginePins::unregisterPins() {
unregisterOutputIfPinOrModeChanged(dizzyOutput, dizzySparkOutputPin, dizzySparkOutputPinMode); unregisterOutputIfPinOrModeChanged(dizzyOutput, dizzySparkOutputPin, dizzySparkOutputPinMode);
unregisterOutputIfPinOrModeChanged(tachOut, tachOutputPin, tachOutputPinMode); unregisterOutputIfPinOrModeChanged(tachOut, tachOutputPin, tachOutputPinMode);
unregisterOutputIfPinOrModeChanged(idleSolenoidPin, idle.solenoidPin, idle.solenoidPinMode); unregisterOutputIfPinOrModeChanged(idleSolenoidPin, idle.solenoidPin, idle.solenoidPinMode);
unregisterOutputIfPinOrModeChanged(secondIdleSolenoidPin, secondSolenoidPin, idle.solenoidPinMode);
unregisterOutputIfPinChanged(sdCsPin, sdCardCsPin); unregisterOutputIfPinChanged(sdCsPin, sdCardCsPin);
unregisterOutputIfPinChanged(accelerometerCs, LIS302DLCsPin); unregisterOutputIfPinChanged(accelerometerCs, LIS302DLCsPin);

View File

@ -141,6 +141,7 @@ public:
OutputPin debugSetTimer; OutputPin debugSetTimer;
OutputPin boostPin; OutputPin boostPin;
OutputPin idleSolenoidPin; OutputPin idleSolenoidPin;
OutputPin secondIdleSolenoidPin;
OutputPin alternatorPin; OutputPin alternatorPin;
/** /**
* this one is usually on the gauge cluster, not on the ECU * this one is usually on the gauge cluster, not on the ECU