auto-sync
This commit is contained in:
parent
5c6be1636e
commit
c07f5c03bd
|
@ -128,7 +128,8 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
|||
*/
|
||||
if (!limitedSpark) {
|
||||
#if SPARK_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
scheduleMsg(logger, "scheduling sparkUp ind=%d %d %s now=%d %d later", trgEventIndex, getRevolutionCounter(), iEvent->output->name, (int)getTimeNowUs(), (int)chargeDelayUs);
|
||||
scheduleMsg(logger, "scheduling sparkUp ind=%d %d %s now=%d %d later id=%d", trgEventIndex, getRevolutionCounter(), iEvent->output->name, (int)getTimeNowUs(), (int)chargeDelayUs,
|
||||
iEvent->sparkId);
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
|
||||
|
@ -145,18 +146,20 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
|||
*/
|
||||
findTriggerPosition(&iEvent->sparkPosition, iEvent->advance PASS_ENGINE_PARAMETER);
|
||||
|
||||
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
printf("spark dwell@ %d/%d spark@ %d/%d id=%d\r\n", iEvent->dwellPosition.eventIndex, (int)iEvent->dwellPosition.angleOffset,
|
||||
iEvent->sparkPosition.eventIndex, (int)iEvent->sparkPosition.angleOffset,
|
||||
iEvent->sparkId);
|
||||
#endif
|
||||
|
||||
if (iEvent->sparkPosition.eventIndex == trgEventIndex) {
|
||||
/**
|
||||
* Spark should be fired before the next trigger event - time-based delay is best precision possible
|
||||
*/
|
||||
float timeTillIgnitionUs = ENGINE(rpmCalculator.oneDegreeUs) * iEvent->sparkPosition.angleOffset;
|
||||
|
||||
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
printf("spark delay=%f angle=%f\r\n", timeTillIgnitionUs, iEvent->sparkPosition.angleOffset);
|
||||
#endif
|
||||
|
||||
#if SPARK_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
scheduleMsg(logger, "scheduling sparkDown ind=%d %d %s now=%d %d later", trgEventIndex, getRevolutionCounter(), iEvent->output->name, (int)getTimeNowUs(), (int)timeTillIgnitionUs);
|
||||
scheduleMsg(logger, "scheduling sparkDown ind=%d %d %s now=%d %d later id=%d", trgEventIndex, getRevolutionCounter(), iEvent->output->name, (int)getTimeNowUs(), (int)timeTillIgnitionUs, iEvent->sparkId);
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
scheduleTask(true, "spark1 down", sDown, (int) timeTillIgnitionUs, (schfunc_t) &turnSparkPinLow, iEvent);
|
||||
|
|
Loading…
Reference in New Issue