This commit is contained in:
rusefi 2017-03-04 00:08:56 -05:00
parent 5090a59d6b
commit 89e4e8cc7a
2 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,8 @@ void TriggerEmulatorHelper::handleEmulatorCallback(PwmConfig *state, int stateIn
bool thirdWheelState = state->multiWave.waves[2].pinStates[prevIndex];
int new3rdWheelState = state->multiWave.waves[2].pinStates[stateIndex];
// todo: code duplication with TriggerStimulatorHelper::nextStep?
if (primaryWheelState != newPrimaryWheelState) {
primaryWheelState = newPrimaryWheelState;
fireShaftSignal(primaryWheelState ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING);

View File

@ -35,6 +35,8 @@ void TriggerStimulatorHelper::nextStep(TriggerState *state, TriggerShape * shape
bool thirdWheelState = shape->wave.getChannelState(2, prevIndex);
bool new3rdWheelState = shape->wave.getChannelState(2, stateIndex);
// todo: code duplication with TriggerEmulatorHelper::handleEmulatorCallback?
if (primaryWheelState != newPrimaryWheelState) {
primaryWheelState = newPrimaryWheelState;
trigger_event_e s = primaryWheelState ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING;