aux overlap debugging
This commit is contained in:
parent
f6e16d4429
commit
c606bb27ac
|
@ -818,6 +818,6 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20191120;
|
return 20191122;
|
||||||
}
|
}
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
|
@ -62,15 +62,25 @@ static void auxValveTriggerCallback(trigger_event_e ckpSignalType,
|
||||||
*/
|
*/
|
||||||
angle_t extra = phaseIndex * 360 + valveIndex * 180;
|
angle_t extra = phaseIndex * 360 + valveIndex * 180;
|
||||||
angle_t onTime = extra + engine->engineState.auxValveStart;
|
angle_t onTime = extra + engine->engineState.auxValveStart;
|
||||||
|
scheduling_s *onEvent = &turnOnEvent[valveIndex][phaseIndex];
|
||||||
|
scheduling_s *offEvent = &turnOffEvent[valveIndex][phaseIndex];
|
||||||
|
bool isOverlap = onEvent->isScheduled || offEvent->isScheduled;
|
||||||
|
if (isOverlap) {
|
||||||
|
enginePins.debugTriggerSync.setValue(1);
|
||||||
|
}
|
||||||
|
|
||||||
fixAngle(onTime, "onTime", CUSTOM_ERR_6556);
|
fixAngle(onTime, "onTime", CUSTOM_ERR_6556);
|
||||||
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, onEvent,
|
||||||
onTime,
|
onTime,
|
||||||
(schfunc_t) &turnOn, output PASS_ENGINE_PARAMETER_SUFFIX);
|
(schfunc_t) &turnOn, output PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
angle_t offTime = extra + engine->engineState.auxValveEnd;
|
angle_t offTime = extra + engine->engineState.auxValveEnd;
|
||||||
fixAngle(offTime, "offTime", CUSTOM_ERR_6557);
|
fixAngle(offTime, "offTime", CUSTOM_ERR_6557);
|
||||||
scheduleByAngle(rpm, &turnOffEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, offEvent,
|
||||||
offTime,
|
offTime,
|
||||||
(schfunc_t) &turnOff, output PASS_ENGINE_PARAMETER_SUFFIX);
|
(schfunc_t) &turnOff, output PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
if (isOverlap) {
|
||||||
|
enginePins.debugTriggerSync.setValue(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue