33#define MICROS_PER_DEG_1_RPM INT32_C(166667)
40#define MAX_RPM INT16_C(18000)
47#define MIN_RPM ((MICROS_PER_DEG_1_RPM/(UINT16_MAX/16UL))+1UL)
uint16_t timeToAngleDegPerMicroSec(uint32_t time)
Definition crankMaths.cpp:40
static int16_t injectorLimits(int16_t angle)
Makes one pass at nudging the angle to within [0,CRANK_ANGLE_MAX_INJ].
Definition crankMaths.h:24
static int16_t ignitionLimits(int16_t angle)
Makes one pass at nudging the angle to within [0,CRANK_ANGLE_MAX_IGN].
Definition crankMaths.h:13
void setAngleConverterRevolutionTime(uint32_t revolutionTime)
Set the revolution time, from which some of the degree<-->angle conversions are derived.
Definition crankMaths.cpp:30
uint32_t angleToTimeMicroSecPerDegree(uint16_t angle)
Definition crankMaths.cpp:35
int CRANK_ANGLE_MAX_IGN
Definition globals.cpp:133
int 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:134
uint32_t revolutionTime
Definition globals.cpp:113
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349
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:211