Nissan VVT trigger decoder #2887

one step back
This commit is contained in:
Andrey 2021-07-03 12:42:07 -04:00
parent 2737045eab
commit 3853e7721a
1 changed files with 4 additions and 2 deletions

View File

@ -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);