mirror of https://github.com/rusefi/rusefi.git
Each bank of cam inputs should have individual edge selection fix #5333
This commit is contained in:
parent
a1e12dca98
commit
b133b88fdb
|
@ -28,6 +28,7 @@ Release template (copy/paste this for new release):
|
||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
- "60/2 VW" trigger wheel renamed to "60-2 Wrong Polarity" #988
|
- "60/2 VW" trigger wheel renamed to "60-2 Wrong Polarity" #988
|
||||||
|
- exhaust VVTs now use it's onw Edge Select setting
|
||||||
|
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
|
@ -42,7 +42,10 @@ static void cam_callback(void *arg, efitick_t stamp) {
|
||||||
|
|
||||||
bool rise = (palReadLine(pal_line) == PAL_HIGH);
|
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);
|
hwHandleVvtCamSignal(TriggerValue::RISE, stamp, index);
|
||||||
} else {
|
} else {
|
||||||
hwHandleVvtCamSignal(TriggerValue::FALL, stamp, index);
|
hwHandleVvtCamSignal(TriggerValue::FALL, stamp, index);
|
||||||
|
|
Loading…
Reference in New Issue