Speeduino
Loading...
Searching...
No Matches
Classes | Functions | Variables
scheduler_fuel_controller.h File Reference

The fuel schedule controller: manages the timing of opening and closing up to 8 injectors. More...

#include "scheduler.h"
#include "config_pages.h"
#include "statuses.h"
#include "fuel_calcs.h"

Go to the source code of this file.

Classes

struct  injectorAngleCalcCache
 

Functions

uint16_t setFuelChannelSchedules (const statuses &current)
 Schedule all fuel channels.
 
void applyPwToInjectorChannels (const pulseWidths &pulse_widths, const config2 &page2, const config4 &page4, const config6 &page6, const config10 &page10, statuses &current)
 Apply the calculated pulse widths to the fuel schedules.
 
void startFuelSchedulers (void)
 Start the timers that drive schedulers.
 
void stopFuelSchedulers (void)
 Stop the timers that drive schedulers.
 
void beginInjectorPriming (const statuses &current, const config4 &page4)
 Start priming the fuel system.
 
void initialiseFuelSchedules (statuses &current, config2 &page2, const config4 &page4, config6 &page6, config10 &page10, const pinNumbers_t &pins)
 Initialise this module.
 
void closeAllInjectors (void)
 Utility function to close all injectors.
 

Variables

FuelSchedule fuelSchedule1
 

Detailed Description

The fuel schedule controller: manages the timing of opening and closing up to 8 injectors.

Anything related to controlling the fuel schedules should be done within this controller.

Function Documentation

◆ applyPwToInjectorChannels()

void applyPwToInjectorChannels ( const pulseWidths &  pulse_widths,
const config2 &  page2,
const config4 &  page4,
const config6 &  page6,
const config10 &  page10,
statuses &  current 
)

Apply the calculated pulse widths to the fuel schedules.

Parameters
pulse_widthsResult of computePulseWidths()
page2Tune settings
page4Tune settings
page6Tune settings
page10Tune settings
currentCurrent system state

◆ beginInjectorPriming()

void beginInjectorPriming ( const statuses &  current,
const config4 &  page4 
)

Start priming the fuel system.

Perform the injector priming pulses. Set these to run at an arbitrary time in the future (100us). The prime pulse value is in ms*10, so need to multiple by 100 to get to uS

◆ closeAllInjectors()

void closeAllInjectors ( void  )

Utility function to close all injectors.

◆ initialiseFuelSchedules()

void initialiseFuelSchedules ( statuses &  current,
config2 &  page2,
const config4 &  page4,
config6 &  page6,
config10 &  page10,
const pinNumbers_t &  pins 
)

Initialise this module.

◆ setFuelChannelSchedules()

uint16_t setFuelChannelSchedules ( const statuses &  current)

Schedule all fuel channels.

Parameters
currentCurrent system state
Returns
The injector angle used.

◆ startFuelSchedulers()

void startFuelSchedulers ( void  )

Start the timers that drive schedulers.

◆ stopFuelSchedulers()

void stopFuelSchedulers ( void  )

Stop the timers that drive schedulers.

Variable Documentation

◆ fuelSchedule1

FuelSchedule fuelSchedule1
extern