mirror of https://github.com/rusefi/rusefi-1.git
better variable name & docs
This commit is contained in:
parent
9f339e5eb4
commit
888ece1749
|
@ -676,13 +676,19 @@ uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape,
|
||||||
// todo: should this variable be declared 'static' to reduce stack usage?
|
// todo: should this variable be declared 'static' to reduce stack usage?
|
||||||
TriggerStimulatorHelper helper;
|
TriggerStimulatorHelper helper;
|
||||||
|
|
||||||
uint32_t index = helper.doFindTrigger(shape, triggerConfig, state PASS_ENGINE_PARAMETER);
|
uint32_t syncIndex = helper.doFindTrigger(shape, triggerConfig, state PASS_ENGINE_PARAMETER);
|
||||||
if (index == EFI_ERROR_CODE) {
|
if (syncIndex == EFI_ERROR_CODE) {
|
||||||
isInitializingTrigger = false;
|
isInitializingTrigger = false;
|
||||||
return index;
|
return syncIndex;
|
||||||
}
|
}
|
||||||
efiAssert(state->getTotalRevolutionCounter() == 1, "totalRevolutionCounter", EFI_ERROR_CODE);
|
efiAssert(state->getTotalRevolutionCounter() == 1, "totalRevolutionCounter", EFI_ERROR_CODE);
|
||||||
|
|
||||||
|
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
|
if (printTriggerDebug) {
|
||||||
|
printf("syncIndex located %d\r\n", syncIndex);
|
||||||
|
}
|
||||||
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Now that we have just located the synch point, we can simulate the whole cycle
|
* Now that we have just located the synch point, we can simulate the whole cycle
|
||||||
* in order to calculate expected duty cycle
|
* in order to calculate expected duty cycle
|
||||||
|
@ -691,10 +697,10 @@ uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape,
|
||||||
*/
|
*/
|
||||||
state->cycleCallback = onFindIndex;
|
state->cycleCallback = onFindIndex;
|
||||||
|
|
||||||
helper.assertSyncPositionAndSetDutyCycle(index, state, shape, triggerConfig PASS_ENGINE_PARAMETER);
|
helper.assertSyncPositionAndSetDutyCycle(syncIndex, state, shape, triggerConfig PASS_ENGINE_PARAMETER);
|
||||||
|
|
||||||
isInitializingTrigger = false;
|
isInitializingTrigger = false;
|
||||||
return index % shape->getSize();
|
return syncIndex % shape->getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initTriggerDecoderLogger(Logging *sharedLogger) {
|
void initTriggerDecoderLogger(Logging *sharedLogger) {
|
||||||
|
|
Loading…
Reference in New Issue