uint16_t COMPARE_TYPE
The timer overflow type.
Definition board_avr2560.h:34
static constexpr uint32_t MICROS_PER_DEG_1_RPM
At 1 RPM, each degree of angular rotation takes this many microseconds.
Definition crankMaths.h:15
uint16_t timeToAngleDegPerMicroSec(uint32_t time)
Converts a time interval in microsecods to the equivalent degrees of angular (crank) rotation at curr...
static int16_t injectorLimits(int16_t angle)
Makes one pass at nudging the angle to within [0,CRANK_ANGLE_MAX_INJ].
Definition crankMaths.h:61
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
static constexpr uint32_t MAX_REVOLUTION_TIME
Maximum time in µS that one crank revolution can take.
Definition crankMaths.h:43
void setAngleConverterRevolutionTime(uint32_t revolutionTime)
Set the revolution time, from which some of the degree<-->angle conversions are derived.
Definition crankMaths.cpp:31
static constexpr uint16_t MAX_RPM
The maximum rpm that the ECU will attempt to run at.
Definition crankMaths.h:22
uint32_t angleToTimeMicroSecPerDegree(uint16_t angle)
Converts angular degrees to the time interval that amount of rotation will take at current RPM.
static constexpr uint16_t MIN_REVOLUTION_TIME
Minimum time in µS that one crank revolution can take.
Definition crankMaths.h:36
COMPARE_TYPE angleToTimerTicks(uint16_t angle)
Converts angular degrees to the equivalent timer ticks at current RPM.
static constexpr uint16_t MIN_RPM
Absolute minimum RPM that the crank math (& therefore all of Speeduino) can be used with.
Definition crankMaths.h:29
int16_t CRANK_ANGLE_MAX_IGN
Definition globals.cpp:40
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:41
#define UDIV_ROUND_UP(n, d, t)
Rounding up unsigned integer division.
Definition maths.h:123
#define UDIV_ROUND_CLOSEST(n, d, t)
Rounded unsigned integer division.
Definition maths.h:104
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
static constexpr uint32_t MICROS_PER_MIN
Self-explanatory.
Definition maths.h:22
static int16_t nudge(int16_t min, int16_t max, int16_t value, int16_t nudgeAmount)
Make one pass at correcting the value into the range [min, max)
Definition maths.h:348