From 3853e7721a71057e29ec1ad44bfeb8416c4b982e Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 3 Jul 2021 12:42:07 -0400 Subject: [PATCH] Nissan VVT trigger decoder #2887 one step back --- firmware/controllers/trigger/trigger_central.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 03cf5ea853..ee4607f03f 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -711,13 +711,11 @@ static void resetRunningTriggerCounters() { void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { bool changed = false; // todo: how do we static_assert here? - efiAssertVoid(OBD_PCM_Processor_Fault, efi::size(CONFIG(camInputs)) == efi::size(CONFIG(vvtMode)), "sizes"); efiAssertVoid(OBD_PCM_Processor_Fault, efi::size(CONFIG(camInputs)) == efi::size(CONFIG(vvtOffsets)), "sizes"); for (size_t camIndex = 0; camIndex < efi::size(CONFIG(camInputs)); camIndex++) { changed |= isConfigurationChanged(camInputs[camIndex]); changed |= isConfigurationChanged(vvtOffsets[camIndex]); - changed |= isConfigurationChanged(vvtMode[camIndex]); } for (size_t i = 0; i < efi::size(CONFIG(triggerGapOverride)); i++) { @@ -728,6 +726,10 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { changed |= isConfigurationChanged(triggerInputPins[i]); } + for (size_t i = 0; i < efi::size(CONFIG(vvtMode)); i++) { + changed |= isConfigurationChanged(vvtMode[i]); + } + changed |= isConfigurationChanged(trigger.type); changed |= isConfigurationChanged(ambiguousOperationMode); changed |= isConfigurationChanged(useOnlyRisingEdgeForTrigger);