Speeduino
Loading...
Searching...
No Matches
scheduler_fuel_controller.h
Go to the documentation of this file.
1
8#pragma once
9#include "scheduler.h"
10#include "config_pages.h"
11#include "statuses.h"
12#include "fuel_calcs.h"
13
15#if (INJ_CHANNELS >= 2)
16extern FuelSchedule fuelSchedule2;
17#endif
18#if (INJ_CHANNELS >= 3)
19extern FuelSchedule fuelSchedule3;
20#endif
21#if (INJ_CHANNELS >= 4)
22extern FuelSchedule fuelSchedule4;
23#endif
24#if INJ_CHANNELS >= 5
25extern FuelSchedule fuelSchedule5;
26#endif
27#if INJ_CHANNELS >= 6
28extern FuelSchedule fuelSchedule6;
29#endif
30#if INJ_CHANNELS >= 7
31extern FuelSchedule fuelSchedule7;
32#endif
33#if INJ_CHANNELS >= 8
34extern FuelSchedule fuelSchedule8;
35#endif
36
44
54void applyPwToInjectorChannels(const pulseWidths &pulse_widths, const config2 &page2, const config4 &page4, const config6 &page6, statuses &current);
55
57void startFuelSchedulers(void);
58
60void stopFuelSchedulers(void);
61
64
67
69void closeAllInjectors(void);
70
71// Unit test support
73 uint16_t pw = 0U;
74 uint16_t pwDegrees = 0U;
75};
The tune page structs and related defines.
const config2 & page2
Definition engineProtection.cpp:438
const config4 const config6 & page6
Definition engineProtection.cpp:155
const config4 & page4
Definition engineProtection.cpp:155
const config4 const config6 const config9 const config10 & page10
Definition engineProtection.cpp:156
Pulse width calculations.
static fastOutputPin_t pins[_countof(coil_pins_t::_M_elems)]
Definition scheduledIO_direct_ign.cpp:10
const config2 const config4 const config6 statuses & current
Definition scheduler_fuel_controller.cpp:506
void initialiseFuelSchedules(statuses &current, const config2 &page2, const config4 &page4, const config10 &page10, const pinNumbers_t &pins)
Initialise this module.
Definition scheduler_fuel_controller.cpp:1143
void startFuelSchedulers(void)
Start the timers that drive schedulers.
Definition scheduler_fuel_controller.cpp:540
void applyPwToInjectorChannels(const pulseWidths &pulse_widths, const config2 &page2, const config4 &page4, const config6 &page6, statuses &current)
Apply the calculated pulse widths to the fuel schedules.
FuelSchedule fuelSchedule1
void stopFuelSchedulers(void)
Stop the timers that drive schedulers.
Definition scheduler_fuel_controller.cpp:560
uint16_t setFuelChannelSchedules(const statuses &current)
Schedule all fuel channels.
void beginInjectorPriming(const statuses &current, const config4 &page4)
Start priming the fuel system.
Definition scheduler_fuel_controller.cpp:586
void closeAllInjectors(void)
Utility function to close all injectors.
Definition scheduler_fuel_controller.cpp:621
The statuses struct and related defines.
A fuel injection schedule.
Definition scheduler.h:220
Definition config_pages.h:649
Definition config_pages.h:175
Definition config_pages.h:355
Definition config_pages.h:454
Definition scheduler_fuel_controller.h:72
uint16_t pwDegrees
Definition scheduler_fuel_controller.h:74
uint16_t pw
Definition scheduler_fuel_controller.h:73
Store the pin assignments, as defined by the board.
Definition pinNumbers_t.h:41
Result of pulse width calculation.
Definition fuel_calcs.h:14
The status struct with current values for all 'live' variables.
Definition statuses.h:47