rusefillc 2021-02-03 11:37:47 -05:00
parent 0fb500a08a
commit 449ff446e2
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ static void applyIdleSolenoidPinState(int stateIndex, PwmConfig *state) /* pwm_g
efiAssertVoid(CUSTOM_ERR_6646, state->multiChannelStateSequence.waveCount == 1, "invalid idle waveCount");
OutputPin *output = state->outputPins[0];
int value = state->multiChannelStateSequence.getChannelState(/*channelIndex*/0, stateIndex);
/**
* - we want stopped engine to be silent to facilitate bench testing of low volume stuff like coil spark
* - we want stopped engine to draw as little amps as possible
*/
if (!value /* always allow turning solenoid off */ ||
(GET_RPM() != 0 || timeToStopIdleTest != 0) /* do not run solenoid unless engine is spinning or bench testing in progress */
) {