auto-sync

This commit is contained in:
rusEfi 2015-12-27 18:01:51 -05:00
parent 8124333cf8
commit ca8078af3a
1 changed files with 1 additions and 2 deletions

View File

@ -61,8 +61,7 @@ void TriggerStimulatorHelper::assertSyncPositionAndSetDutyCycle(uint32_t index,
for (uint32_t i = startIndex; i <= index + 2 * shape->getSize(); i++) {
nextStep(state, shape, i, triggerConfig PASS_ENGINE_PARAMETER);
}
// todo: nicer error handling?
efiAssertVoid(state->getTotalRevolutionCounter() == 3, "totalRevolutionCounter2 expected 3");
efiAssertVoid(state->getTotalRevolutionCounter() == 3, "sync failed, wrong gap parameters?");
for (int i = 0; i < PWM_PHASE_MAX_WAVE_PER_PWM; i++) {
shape->dutyCycle[i] = 1.0 * state->expectedTotalTime[i] / SIMULATION_CYCLE_PERIOD;