Nissan progress

This commit is contained in:
Andrey 2021-07-02 20:12:31 -04:00
parent 2911e128d9
commit 9339f0169d
2 changed files with 16 additions and 3 deletions

View File

@ -156,6 +156,15 @@ void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_P
case SHAFT_SECONDARY_RISING:
currentTrigger2 = true;
break;
// major hack to get most value of limited logic data write
#if EFI_UNIT_TEST
case SHAFT_3RD_FALLING:
currentCoilState = false;
break;
case SHAFT_3RD_RISING:
currentCoilState = true;
break;
#endif
default:
break;
}

View File

@ -128,11 +128,15 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
#if EFI_TOOTH_LOGGER
// todo: we need to start logging different VVT channels differently!!!
if (front == TV_RISE) {
LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
trigger_event_e tooth;
if (index == 0) {
tooth = front == TV_RISE ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING;
} else {
LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
// todo: nicer solution is needed
tooth = front == TV_RISE ? SHAFT_3RD_FALLING : SHAFT_3RD_FALLING;
}
LogTriggerTooth(tooth, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_TOOTH_LOGGER */
}