RAM efficiency of VR crank trigger shapes #2182
Audi OEM 5-cyl trigger pattern aka "Tri-Tach" https://rusefi.com/forum/viewtopic.php?f=5&t=1912
This commit is contained in:
parent
43f37c677a
commit
8c38664084
|
@ -186,6 +186,14 @@ extern bool printTriggerDebug;
|
|||
void TriggerWaveform::calculateExpectedEventCounts(bool useOnlyRisingEdgeForTrigger) {
|
||||
UNUSED(useOnlyRisingEdgeForTrigger);
|
||||
|
||||
if (!useOnlyRisingEdgeForTrigger) {
|
||||
for (int i = 0;i<efi::size(expectedEventCount);i++) {
|
||||
if (expectedEventCount[i] % 2 != 0) {
|
||||
firmwareError(ERROR_TRIGGER_DRAMA, "Trigger: should be even %d %d", i, expectedEventCount[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isSingleToothOnPrimaryChannel = useOnlyRisingEdgeForTrigger ? expectedEventCount[0] == 1 : expectedEventCount[0] == 2;
|
||||
// todo: next step would be to set 'isSynchronizationNeeded' automatically based on the logic we have here
|
||||
if (!shapeWithoutTdc && isSingleToothOnPrimaryChannel != !isSynchronizationNeeded) {
|
||||
|
|
Loading…
Reference in New Issue