better error message

This commit is contained in:
rusefi 2017-03-04 08:35:22 -05:00
parent d9e8623559
commit 9f339e5eb4
1 changed files with 3 additions and 2 deletions

View File

@ -71,8 +71,9 @@ 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);
}
if (state->getTotalRevolutionCounter() != 3) {
warning(CUSTOM_OBD_TRIGGER_SHAPE, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type));
int revolutionCounter = state->getTotalRevolutionCounter();
if (revolutionCounter != 3) {
warning(CUSTOM_OBD_TRIGGER_SHAPE, "sync failed/wrong gap parameters trigger=%s rc=%d", getTrigger_type_e(engineConfiguration->trigger.type), revolutionCounter);
shape->shapeDefinitionError = true;
return;
}