mirror of https://github.com/rusefi/rusefi-1.git
making validation stronger
This commit is contained in:
parent
d5370d03b8
commit
af25eb8c6d
|
@ -87,11 +87,11 @@ void TriggerStimulatorHelper::assertSyncPositionAndSetDutyCycle(const uint32_t s
|
|||
/**
|
||||
* let's feed two more cycles to validate shape definition
|
||||
*/
|
||||
for (uint32_t i = syncIndex + 1; i <= syncIndex + 2 * shape->getSize(); i++) {
|
||||
for (uint32_t i = syncIndex + 1; i <= syncIndex + GAP_TRACKING_LENGTH * shape->getSize(); i++) {
|
||||
feedSimulatedEvent(state, shape, i PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
int revolutionCounter = state->getTotalRevolutionCounter();
|
||||
if (revolutionCounter != 3) {
|
||||
if (revolutionCounter != GAP_TRACKING_LENGTH + 1) {
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue