Each bank of cam inputs should have individual edge selection fix #5333

This commit is contained in:
rusefi 2024-04-24 21:26:38 -04:00
parent a1e12dca98
commit b133b88fdb
2 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ Release template (copy/paste this for new release):
### Breaking Changes
- "60/2 VW" trigger wheel renamed to "60-2 Wrong Polarity" #988
- exhaust VVTs now use it's onw Edge Select setting
## Unreleased

View File

@ -42,7 +42,10 @@ static void cam_callback(void *arg, efitick_t stamp) {
bool rise = (palReadLine(pal_line) == PAL_HIGH);
if (rise ^ engineConfiguration->invertCamVVTSignal) {
int camIndex = CAM_BY_INDEX(index);
bool invertSetting = camIndex == 0 ? engineConfiguration->invertCamVVTSignal : engineConfiguration->invertExhaustCamVVTSignal;
if (rise ^ invertSetting) {
hwHandleVvtCamSignal(TriggerValue::RISE, stamp, index);
} else {
hwHandleVvtCamSignal(TriggerValue::FALL, stamp, index);