static integerPID_ideal boostPID & currentStatus
Definition auxiliaries.cpp:188
#define SET_COMPARE(compare, value)
Definition board_definition.h:80
Crank revolution based mathematical functions.
COMPARE_TYPE angleToTimerTicks(uint16_t angle) noexcept
Converts angular degrees to the equivalent timer ticks at current RPM.
static int16_t ignitionLimits(int16_t angle)
Makes one pass at nudging the angle to within [0,CRANK_ANGLE_MAX_IGN].
Definition crankMaths.h:51
uint32_t angleToTimeMicroSecPerDegree(uint16_t angle) noexcept
Converts angular degrees to the time interval that amount of rotation will take at current RPM.
uint16_t timeToAngleDegPerMicroSec(uint32_t time) noexcept
Converts a time interval in microsecods to the equivalent degrees of angular (crank) rotation at curr...
static constexpr uint16_t MIN_REVOLUTION_TIME
Minimum time in µS that one crank revolution can take.
Definition crankMaths.h:36
int16_t CRANK_ANGLE_MAX_IGN
Definition globals.cpp:32
int16_t CRANK_ANGLE_MAX_INJ
The number of crank degrees that the system track over. Typically 720 divided by the number of squirt...
Definition globals.cpp:33
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
page_iterator_t advance(const page_iterator_t &iter)
Definition pages.cpp:529
#define FORCE_INLINE
Definition preprocessor.h:82
static uint32_t _calculateIgnitionTimeout(const IgnitionSchedule &schedule, int16_t crankAngle)
Definition schedule_calcs.hpp:137
static uint32_t calculateInjectorTimeout(const FuelSchedule &schedule, int16_t crankAngle, uint16_t openAngle)
Calculate the time in uS from now to when the injector should be opened.
Definition schedule_calcs.hpp:92
static uint16_t updatePwAngleCache(uint16_t pw, injectorAngleCalcCache *pCache)
Definition schedule_calcs.hpp:40
static int16_t _calculateSparkAngle(const IgnitionSchedule &schedule, int8_t advance)
Definition schedule_calcs.hpp:111
static FORCE_INLINE uint16_t _adjustToTDC(int16_t angle, uint16_t angleOffset, uint16_t maxAngle)
Definition schedule_calcs.hpp:62
static int16_t _calculateCoilChargeAngle(uint16_t dwellAngle, int16_t dischargeAngle)
Definition schedule_calcs.hpp:117
static void calculateIgnitionAngles(IgnitionSchedule &schedule, uint16_t dwellAngle, int8_t advance)
Definition schedule_calcs.hpp:124
static uint16_t _calculateOpenAngle(FuelSchedule &schedule, uint16_t pwDegrees, uint16_t injAngle)
Compute the injector open angle for an injection channel.
Definition schedule_calcs.hpp:18
static void adjustCrankAngle(IgnitionSchedule &schedule, int16_t crankAngle)
Adjust the crank angle used to originally set the schedule.
Definition schedule_calcs.hpp:152
static void calculateIgnitionTrailingRotary(IgnitionSchedule &leading, uint16_t dwellAngle, int16_t rotarySplitDegrees, IgnitionSchedule &trailing)
Definition schedule_calcs.hpp:131
static FORCE_INLINE uint32_t _calculateAngularTime(const Schedule &schedule, uint16_t eventAngle, uint16_t crankAngle, uint16_t maxAngle)
Definition schedule_calcs.hpp:53
@ PENDING
Definition scheduler.h:57
@ OFF
Definition scheduler.h:55
static bool isRunning(const Schedule &schedule) noexcept
Is the schedule running? I.e. the action has started, but not finished. E.g. injector is open.
Definition scheduler.h:134
uint16_t crankAngle
Definition scheduler_ignition_controller.cpp:437
uint16_t dwellAngle
Definition scheduler_ignition_controller.cpp:408
A fuel injection schedule.
Definition scheduler.h:208
An ignition schedule.
Definition scheduler.h:178
A schedule for a single output channel.
Definition scheduler.h:87
Definition schedule_calcs.hpp:35
uint16_t pwDegrees
Definition schedule_calcs.hpp:37
uint16_t pw
Definition schedule_calcs.hpp:36