auto-sync

This commit is contained in:
rusEfi 2015-12-27 18:01:51 -05:00
parent e6213d5454
commit 95807279ff
2 changed files with 7 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;

View File

@ -2501,6 +2501,12 @@
<file>
<name>$PROJ_DIR$\..\controllers\trigger\trigger_nissan.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\trigger_rover.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\trigger_rover.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\trigger_simulator.cpp</name>
</file>