parent
36211a6738
commit
262e3a4516
|
@ -122,11 +122,11 @@ static inline void tempTurnPinHigh(InjectorOutputPin *output) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: make these macro? kind of a penny optimization if compiler is not smart to inline
|
|
||||||
void seTurnPinHigh(InjectionEvent *event) {
|
void seTurnPinHigh(InjectionEvent *event) {
|
||||||
for (int i = 0;i < MAX_WIRES_COUNT;i++) {
|
for (int i = 0;i < MAX_WIRES_COUNT;i++) {
|
||||||
InjectorOutputPin *output = event->outputs[i];
|
InjectorOutputPin *output = event->outputs[i];
|
||||||
if (output != NULL) {
|
|
||||||
|
if (output) {
|
||||||
tempTurnPinHigh(output);
|
tempTurnPinHigh(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,6 +266,8 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
|
||||||
getRevolutionCounter());
|
getRevolutionCounter());
|
||||||
#endif /* EFI_DEFAILED_LOGGING */
|
#endif /* EFI_DEFAILED_LOGGING */
|
||||||
|
|
||||||
|
scheduling_s *sUp = &event->signalTimerUp;
|
||||||
|
scheduling_s *sDown = &event->endOfInjectionEvent;
|
||||||
|
|
||||||
if (event->isSimultanious) {
|
if (event->isSimultanious) {
|
||||||
/**
|
/**
|
||||||
|
@ -274,14 +276,10 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
|
||||||
* changed into 'scheduleInjection' and unified? todo: think about it.
|
* changed into 'scheduleInjection' and unified? todo: think about it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scheduling_s * sUp = &event->signalTimerUp;
|
// todo: sequential need this logic as well, just do not forget to clear flag event->isScheduled = true;
|
||||||
// todo: sequential need this logic as well, just do not forget to clear flag event->isScheduled = true;
|
|
||||||
scheduling_s * sDown = &event->endOfInjectionEvent;
|
|
||||||
|
|
||||||
engine->executor.scheduleForLater(sUp, (int) injectionStartDelayUs, { &startSimultaniousInjection, engine });
|
engine->executor.scheduleForLater(sUp, (int) injectionStartDelayUs, { &startSimultaniousInjection, engine });
|
||||||
engine->executor.scheduleForLater(sDown, (int) injectionStartDelayUs + durationUs,
|
engine->executor.scheduleForLater(sDown, (int) injectionStartDelayUs + durationUs,
|
||||||
{ &endSimultaniousInjection, event });
|
{ &endSimultaniousInjection, event });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#if EFI_UNIT_TEST
|
#if EFI_UNIT_TEST
|
||||||
printf("scheduling injection angle=%.2f/delay=%.2f injectionDuration=%.2f\r\n", event->injectionStart.angleOffsetFromTriggerEvent, injectionStartDelayUs, injectionDuration);
|
printf("scheduling injection angle=%.2f/delay=%.2f injectionDuration=%.2f\r\n", event->injectionStart.angleOffsetFromTriggerEvent, injectionStartDelayUs, injectionDuration);
|
||||||
|
@ -314,8 +312,6 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
|
||||||
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
||||||
return; // this InjectionEvent is still needed for an extremely long injection scheduled previously
|
return; // this InjectionEvent is still needed for an extremely long injection scheduled previously
|
||||||
}
|
}
|
||||||
scheduling_s * sUp = &event->signalTimerUp;
|
|
||||||
scheduling_s * sDown = &event->endOfInjectionEvent;
|
|
||||||
|
|
||||||
event->isScheduled = true;
|
event->isScheduled = true;
|
||||||
efitimeus_t turnOnTime = nowUs + (int) injectionStartDelayUs;
|
efitimeus_t turnOnTime = nowUs + (int) injectionStartDelayUs;
|
||||||
|
|
Loading…
Reference in New Issue