rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Functions
fuel_schedule.h File Reference

Data Structures

class  InjectionEvent
 
class  FuelSchedule
 

Functions

void turnInjectionPinHigh (scheduler_arg_t arg)
 
FuelSchedulegetFuelSchedule ()
 

Function Documentation

◆ getFuelSchedule()

FuelSchedule * getFuelSchedule ( )

Definition at line 600 of file engine.cpp.

600 {
601 return &engine->injectionEvents;
602}
FuelSchedule injectionEvents
Definition engine.h:288
static EngineAccessor engine
Definition engine.h:413

Referenced by handleFuel(), and mainTriggerCallback().

Here is the caller graph for this function:

◆ turnInjectionPinHigh()

void turnInjectionPinHigh ( scheduler_arg_t  arg)

Definition at line 11 of file fuel_schedule.cpp.

11 {
12 auto const nowNt{ getTimeNowNt() };
13
14 auto const taggedPointer{ TaggedPointer<InjectionEvent>::fromRaw(arg) };
15 auto const event{ taggedPointer.getOriginalPointer() };
16 auto const hasStage2Injection{ taggedPointer.getFlag() };
17
18 for (auto const& output: event->outputs) {
19 if (output) {
20 output->open(nowNt);
21 }
22 }
23
24 if (hasStage2Injection) {
25 for (auto const& output: event->outputsStage2) {
26 if (output) {
27 output->open(nowNt);
28 }
29 }
30 }
31}
efitick_t getTimeNowNt()
Definition efitime.cpp:19
static SimplePwm outputs[GPPWM_CHANNELS]
Definition gppwm.cpp:8
constexpr T * getOriginalPointer() const
Definition scheduler.h:64
static constexpr TaggedPointer fromRaw(scheduler_arg_t raw)
Definition scheduler.h:52
Here is the call graph for this function:

Go to the source code of this file.