Nissan VVT trigger decoder #2887
This commit is contained in:
parent
7a2f69367f
commit
2737045eab
|
@ -710,8 +710,14 @@ static void resetRunningTriggerCounters() {
|
||||||
|
|
||||||
void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
for (size_t i = 0; i < efi::size(CONFIG(camInputs)); i++) {
|
// todo: how do we static_assert here?
|
||||||
changed |= isConfigurationChanged(camInputs[i]);
|
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++) {
|
for (size_t i = 0; i < efi::size(CONFIG(triggerGapOverride)); i++) {
|
||||||
|
@ -722,10 +728,6 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
changed |= isConfigurationChanged(triggerInputPins[i]);
|
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(trigger.type);
|
||||||
changed |= isConfigurationChanged(ambiguousOperationMode);
|
changed |= isConfigurationChanged(ambiguousOperationMode);
|
||||||
changed |= isConfigurationChanged(useOnlyRisingEdgeForTrigger);
|
changed |= isConfigurationChanged(useOnlyRisingEdgeForTrigger);
|
||||||
|
@ -734,7 +736,6 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
changed |= isConfigurationChanged(trigger.customSkippedToothCount);
|
changed |= isConfigurationChanged(trigger.customSkippedToothCount);
|
||||||
changed |= isConfigurationChanged(vvtCamSensorUseRise);
|
changed |= isConfigurationChanged(vvtCamSensorUseRise);
|
||||||
changed |= isConfigurationChanged(overrideTriggerGaps);
|
changed |= isConfigurationChanged(overrideTriggerGaps);
|
||||||
changed |= isConfigurationChanged(vvtOffset);
|
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
assertEngineReference();
|
assertEngineReference();
|
||||||
|
|
Loading…
Reference in New Issue