2JZ cam trigger configuration is much easier to adjust #5557

only:proteus_f4
This commit is contained in:
rusefillc 2023-09-10 10:34:06 -04:00
parent 5e19fe6dd4
commit 1c154f6ee7
3 changed files with 4 additions and 3 deletions

View File

@ -45,6 +45,7 @@ Release template (copy/paste this for new release):
- simulator: sensor mocking UI #5473 - simulator: sensor mocking UI #5473
- Custom Trigger Tooth with 1+0 causes endless loop #5471 - Custom Trigger Tooth with 1+0 causes endless loop #5471
- nucleo-h7 bundle st-link flushing #5486 - nucleo-h7 bundle st-link flushing #5486
- 2JZ cam trigger configuration is much easier to adjust #5557
## July 2023 Release "Day 518" ## July 2023 Release "Day 518"

View File

@ -75,7 +75,7 @@ void setDefaultBaseEngine() {
engineConfiguration->primingDelay = 0.5; engineConfiguration->primingDelay = 0.5;
engineConfiguration->vvtControlMinRpm = 500.0; engineConfiguration->vvtControlMinRpm = 500.0;
engineConfiguration->camDecoder2jzPosition = 75; engineConfiguration->camDecoder2jzPosition = 95;
engineConfiguration->camDecoder2jzPrecision = 25; engineConfiguration->camDecoder2jzPrecision = 25;
// Limits and Fallbacks // Limits and Fallbacks

View File

@ -354,8 +354,8 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
int from = engineConfiguration->camDecoder2jzPosition - engineConfiguration->camDecoder2jzPrecision; int from = engineConfiguration->camDecoder2jzPosition - engineConfiguration->camDecoder2jzPrecision;
int to = engineConfiguration->camDecoder2jzPosition + engineConfiguration->camDecoder2jzPrecision; int to = engineConfiguration->camDecoder2jzPosition + engineConfiguration->camDecoder2jzPrecision;
// we do not know if we are in sync or out of sync, so we have to be looking for both possibilities // we do not know if we are in sync or out of sync, so we have to be looking for both possibilities
if ((currentPosition < from || to) && if ((currentPosition < from || currentPosition > to) &&
(currentPosition < from + 360 || to + 360)) { (currentPosition < from + 360 || currentPosition > to + 360)) {
// outside of the expected range // outside of the expected range
return; return;
} }