diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index b4c44c4794..e667e78e2a 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -451,8 +451,9 @@ void Engine::OnTriggerSyncronization(bool wasSynchronized) { if (isTriggerDecoderError(PASS_ENGINE_PARAMETER_SIGNATURE)) { warning(CUSTOM_OBD_TRG_DECODING, "trigger decoding issue. expected %d/%d/%d got %d/%d/%d", - TRIGGER_WAVEFORM(expectedEventCount[0]), TRIGGER_WAVEFORM(expectedEventCount[1]), - TRIGGER_WAVEFORM(expectedEventCount[2]), + TRIGGER_WAVEFORM(getExpectedEventCount(0)), + TRIGGER_WAVEFORM(getExpectedEventCount(1)), + TRIGGER_WAVEFORM(getExpectedEventCount(2)), triggerCentral.triggerState.currentCycle.eventCount[0], triggerCentral.triggerState.currentCycle.eventCount[1], triggerCentral.triggerState.currentCycle.eventCount[2]); diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 5c9965b695..92ea0024ad 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -190,7 +190,7 @@ int TriggerWaveform::getExpectedEventCount(int channelIndex) { void TriggerWaveform::calculateExpectedEventCounts(bool useOnlyRisingEdgeForTrigger) { if (!useOnlyRisingEdgeForTrigger) { for (size_t i = 0; i < efi::size(expectedEventCount); i++) { - if (expectedEventCount[i] % 2 != 0) { + if (getExpectedEventCount(i) % 2 != 0) { firmwareError(ERROR_TRIGGER_DRAMA, "Trigger: should be even %d %d", i, expectedEventCount[i]); } }