Audi OEM 5-cyl trigger pattern aka "Tri-Tach" https://rusefi.com/forum/viewtopic.php?f=5&t=1912

This commit is contained in:
rusefillc 2021-01-04 21:05:16 -05:00
parent c01b2e9bb5
commit da8c1a3ed4
2 changed files with 4 additions and 1 deletions

View File

@ -228,9 +228,10 @@ void TriggerWaveform::addEvent(angle_t angle, trigger_wheel_e const channelIndex
}
#if EFI_UNIT_TEST
assertIsInBounds(privateTriggerDefinitionSize, triggerSignalIndeces, "trigger shape overflow");
triggerSignalIndeces[privateTriggerDefinitionSize] = channelIndex;
triggerSignalStates[privateTriggerDefinitionSize] = stateParam;
#endif
#endif // EFI_UNIT_TEST
// todo: the whole 'useOnlyRisingEdgeForTrigger' parameter and logic should not be here

View File

@ -105,6 +105,8 @@ constexpr size_t size(const T(&)[N]) {
}
} // namespace efi
#define assertIsInBounds(length, array, msg) efiAssertVoid(OBD_PCM_Processor_Fault, (length) >= 0 && (length) < efi::size(array), msg)
/**
* Copies an array from src to dest. The lengths of the arrays must match.
*/