static void endIntegration(void) { /** * isIntegrating could be 'false' if an SPI command was pending thus we did not integrate during this * engine cycle */ if (state == IS_INTEGRATING) { turnPinLow(&intHold); state = WAITING_FOR_ADC_TO_SKIP; } }
static void endSimultaniousInjection(InjectionEvent *event) { #if EFI_UNIT_TEST || defined(__DOXYGEN__) Engine *engine = event->engine; EXPAND_Engine; #endif for (int i = 0; i < engine->engineConfiguration->specs.cylindersCount; i++) { turnPinLow(&enginePins.injectors[i]); } engine->injectionEvents.addFuelEventsForCylinder(event->ownIndex PASS_ENGINE_PARAMETER); }
static void tempTurnPinLow(InjectorOutputPin *output) { #if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__) printf("seTurnPinLow %s %d %d\r\n", output->name, output->overlappingCounter, (int)getTimeNowUs()); #endif /* FUEL_MATH_EXTREME_LOGGING */ if (output->cancelNextTurningInjectorOff) { /** * in case of fuel schedule overlap between engine cycles, * and if engine cycle is above say 75% for batch mode on 4 cylinders, * we will get a secondary overlap between the special injection and a normal injection on the same injector. * In such a case want to combine these two injection into one continues injection. * Unneeded turn of injector on is handle while scheduling that second injection, but cancellation * of special injection end has to be taken care of dynamically * */ output->cancelNextTurningInjectorOff = false; #if EFI_SIMULATOR || defined(__DOXYGEN__) printf("was cancelled %s %d\r\n", output->name, (int)getTimeNowUs()); #endif /* EFI_SIMULATOR */ return; } #if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__) const char * w = output->currentLogicValue == false ? "err" : ""; // scheduleMsg(&sharedLogger, "- %spin=%s eventIndex %d %d", w, output->name, // getRevolutionCounter(), getTimeNowUs()); #endif /* FUEL_MATH_EXTREME_LOGGING */ output->overlappingCounter--; if (output->overlappingCounter > 0) { #if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__) printf("was overlapping, no need to touch pin %s %d\r\n", output->name, (int)getTimeNowUs()); #endif /* FUEL_MATH_EXTREME_LOGGING */ return; } turnPinLow(output); }
static void endSimultaniousInjection(Engine *engine) { for (int i = 0; i < engine->engineConfiguration->specs.cylindersCount; i++) { turnPinLow(&enginePins.injectors[i]); } }