46#define USE_IGN_REFRESH
47#define IGNITION_REFRESH_THRESHOLD 30
49#define DWELL_AVERAGE_ALPHA 30
50#define DWELL_AVERAGE(input) LOW_PASS_FILTER((input), DWELL_AVERAGE_ALPHA, currentStatus.actualDwell)
62#if defined(ARDUINO_ARCH_STM32) || defined(CORE_TEENSY)
67#if (INJ_CHANNELS >= 5)
70#if (INJ_CHANNELS >= 6)
73#if (INJ_CHANNELS >= 7)
76#if (INJ_CHANNELS >= 8)
79#if (IGN_CHANNELS >= 1)
82#if (IGN_CHANNELS >= 2)
85#if (IGN_CHANNELS >= 3)
88#if (IGN_CHANNELS >= 4)
91#if (IGN_CHANNELS >= 5)
94#if (IGN_CHANNELS >= 6)
97#if (IGN_CHANNELS >= 7)
100#if (IGN_CHANNELS >= 8)
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349
void fuelSchedule1Interrupt()
Definition scheduler.cpp:364
void fuelSchedule3Interrupt()
Definition scheduler.cpp:384
void fuelSchedule2Interrupt()
Definition scheduler.cpp:374
void fuelSchedule4Interrupt()
Definition scheduler.cpp:394
void ignitionSchedule1Interrupt(void)
Definition scheduler.cpp:487
void _setIgnitionScheduleNext(IgnitionSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.cpp:259
void setFuelSchedule(FuelSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.h:203
void _setFuelScheduleNext(FuelSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.cpp:232
void initialiseSchedulers(void)
Definition scheduler.cpp:79
void _setFuelScheduleRunning(FuelSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.cpp:213
IgnitionSchedule ignitionSchedule5
FuelSchedule fuelSchedule3
void refreshIgnitionSchedule1(unsigned long timeToEnd)
Definition scheduler.cpp:269
FuelSchedule fuelSchedule4
void disablePendingIgnSchedule(byte channel)
Definition scheduler.cpp:610
void _setIgnitionScheduleRunning(IgnitionSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.cpp:241
IgnitionSchedule ignitionSchedule1
FuelSchedule fuelSchedule1
IgnitionSchedule ignitionSchedule4
void disablePendingFuelSchedule(byte channel)
Definition scheduler.cpp:570
void setIgnitionSchedule(IgnitionSchedule &schedule, unsigned long timeout, unsigned long duration)
Definition scheduler.h:153
FuelSchedule fuelSchedule2
void beginInjectorPriming(void)
Definition scheduler.cpp:286
ScheduleStatus
Definition scheduler.h:110
@ RUNNING
Definition scheduler.h:110
@ PENDING
Definition scheduler.h:110
@ STAGED
Definition scheduler.h:110
@ OFF
Definition scheduler.h:110
IgnitionSchedule ignitionSchedule3
IgnitionSchedule ignitionSchedule2
Definition scheduler.h:167
void(&) pTimerDisable()
Definition scheduler.h:196
void(* pEndFunction)(void)
Definition scheduler.h:189
void(&) pTimerEnable()
Definition scheduler.h:197
COMPARE_TYPE nextStartCompare
Definition scheduler.h:190
decltype(FUEL1_COUNTER) counter_t
Definition scheduler.h:172
COMPARE_TYPE nextEndCompare
Definition scheduler.h:191
volatile COMPARE_TYPE startCompare
The counter value of the timer when this will start.
Definition scheduler.h:186
volatile COMPARE_TYPE endCompare
The counter value of the timer when this will end.
Definition scheduler.h:187
FuelSchedule(counter_t &counter, compare_t &compare, void(&_pTimerDisable)(), void(&_pTimerEnable)())
Definition scheduler.h:175
volatile ScheduleStatus Status
Schedule status: OFF, PENDING, STAGED, RUNNING.
Definition scheduler.h:185
counter_t & counter
Definition scheduler.h:194
decltype(FUEL1_COMPARE) compare_t
Definition scheduler.h:173
compare_t & compare
Definition scheduler.h:195
volatile unsigned long duration
Scheduled duration (uS ?)
Definition scheduler.h:184
volatile bool hasNextSchedule
Definition scheduler.h:192
void(* pStartFunction)(void)
Definition scheduler.h:188
Definition scheduler.h:114
decltype(IGN1_COMPARE) compare_t
Definition scheduler.h:120
volatile ScheduleStatus Status
Schedule status: OFF, PENDING, STAGED, RUNNING.
Definition scheduler.h:132
COMPARE_TYPE nextStartCompare
Planned start of next schedule (when current schedule is RUNNING)
Definition scheduler.h:139
void(* pStartCallback)(void)
Start Callback function for schedule.
Definition scheduler.h:133
void(&) pTimerEnable()
Definition scheduler.h:147
IgnitionSchedule(counter_t &counter, compare_t &compare, void(&_pTimerDisable)(), void(&_pTimerEnable)())
Definition scheduler.h:122
compare_t & compare
Definition scheduler.h:145
volatile unsigned long startTime
Definition scheduler.h:135
decltype(IGN1_COUNTER) counter_t
Definition scheduler.h:119
COMPARE_TYPE nextEndCompare
Planned end of next schedule (when current schedule is RUNNING)
Definition scheduler.h:140
volatile unsigned long duration
Scheduled duration (uS ?)
Definition scheduler.h:131
volatile bool hasNextSchedule
Enable flag for planned next schedule (when current schedule is RUNNING)
Definition scheduler.h:141
volatile COMPARE_TYPE startCompare
The counter value of the timer when this will start.
Definition scheduler.h:136
void(* pEndCallback)(void)
End Callback function for schedule.
Definition scheduler.h:134
counter_t & counter
Definition scheduler.h:144
void(&) pTimerDisable()
Definition scheduler.h:146
volatile COMPARE_TYPE endCompare
The counter value of the timer when this will end.
Definition scheduler.h:137
volatile bool endScheduleSetByDecoder
Definition scheduler.h:142