better constraint validation
This commit is contained in:
parent
4a25d5b48e
commit
306a450568
|
@ -202,6 +202,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF
|
|||
return false;
|
||||
}
|
||||
|
||||
efiAssert(!cisnan(angle), "findAngle#3", false);
|
||||
TRIGGER_SHAPE(findTriggerPosition(&ev->injectionStart, angle PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
printf("registerInjectionEvent angle=%f trgIndex=%d inj %d\r\n", angle, ev->injectionStart.eventIndex, injectorIndex);
|
||||
|
|
|
@ -172,6 +172,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
|||
* Spark event is often happening during a later trigger event timeframe
|
||||
* TODO: improve precision
|
||||
*/
|
||||
efiAssertVoid(!cisnan(iEvent->advance), "findAngle#4");
|
||||
TRIGGER_SHAPE(findTriggerPosition(&iEvent->sparkPosition, iEvent->advance PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
|
@ -243,7 +244,9 @@ void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFI
|
|||
event->outputs[1] = secondOutput;
|
||||
event->advance = localAdvance;
|
||||
|
||||
TRIGGER_SHAPE(findTriggerPosition(&event->dwellPosition, localAdvance - dwellAngle PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
angle_t a = localAdvance - dwellAngle;
|
||||
efiAssertVoid(!cisnan(a), "findAngle#5");
|
||||
TRIGGER_SHAPE(findTriggerPosition(&event->dwellPosition, a PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
printf("addIgnitionEvent %s ind=%d\n", output->name, event->dwellPosition.eventIndex);
|
||||
|
|
Loading…
Reference in New Issue