32#if !defined(UNIT_TEST)
38 int16_t
calculate(uint32_t currMicros)
const;
50#if !defined(UNIT_TEST)
56 int16_t
calculate(uint32_t currMicros)
const;
66#if !defined(UNIT_TEST)
88#if !defined(UNIT_TEST)
102#if !defined(UNIT_TEST)
The tune page structs and related defines.
TESTABLE_STATIC volatile uint32_t toothLastMinusOneToothTime
Definition decoders.cpp:66
TESTABLE_STATIC int16_t toothAngles[24]
Definition decoders.cpp:90
TESTABLE_STATIC volatile uint32_t toothLastToothTime
Definition decoders.cpp:63
TESTABLE_STATIC uint16_t toothCurrentCount
Definition decoders.cpp:60
const config4 & page4
Definition engineProtection.cpp:172
Workaround when min() & max() are defined as macros, which generates compile errors in most C++ stand...
Definition crank_angle_calculator.h:169
compute_crank_angle_calculator_tooth_interval_t()=default
int16_t calculateCrankAngle(uint32_t currMicros, const config4 &page4) const
Calculate the crank angle.
Definition crank_angle_calculator.cpp:155
A crank angle calculator that computes the initial crank angle from a tooth angle.
Definition crank_angle_calculator.h:84
uint16_t _toothCurrentCount
1-based tooth number
Definition crank_angle_calculator.h:85
int16_t calculate(void) const
Definition crank_angle_calculator.cpp:64
uint16_t _toothAngle
Tooth angle (1-359°)
Definition crank_angle_calculator.h:86
compute_initial_calculator_t()=default
Definition config_pages.h:353
A crank angle calculator that computes a temporal adjustment based on when the tooth was last detecte...
Definition crank_angle_calculator.h:29
uint32_t _toothLastToothTime
Time in µS that the current tooth was last detected.
Definition crank_angle_calculator.h:30
last_tooth_rev_calculator_t()=default
int16_t calculate(uint32_t currMicros) const
Definition crank_angle_calculator.cpp:13
Definition crank_angle_calculator.h:125
lookup_crank_angle_calculator_t()=default
int16_t calculateCrankAngle(uint32_t currMicros, const int16_t toothAngles[], const config4 &page4) const
Calculate the crank angle.
Definition crank_angle_calculator.cpp:109
Definition crank_angle_calculator.h:154
lookup_crank_angle_calculator_tooth_interval_t()=default
int16_t calculateCrankAngle(uint32_t currMicros, const int16_t toothAngles[], const config4 &page4) const
Calculate the crank angle.
Definition crank_angle_calculator.cpp:139
A crank angle calculator that looks up the initial crank angle from an array.
Definition crank_angle_calculator.h:63
lookup_initial_calculator_t()=default
uint16_t _toothCurrentCount
1-based tooth number
Definition crank_angle_calculator.h:64
int16_t calculate(const int16_t toothAngles[]) const
Calculate the crank angle.
Definition crank_angle_calculator.cpp:46
A crank angle calculator that computes a revolution adjustment.
Definition crank_angle_calculator.h:99
bool _revZeroOrOne
When calculating over 720°, tells the calculator if we are in the 1st revolution (false) or the 2nd (...
Definition crank_angle_calculator.h:100
int16_t calculate(const config4 &page4) const
Definition crank_angle_calculator.cpp:81
sequential_correction_calculator_t()=default
Definition crank_angle_calculator.h:120
int16_t calculateCrankAngle(int16_t initialCrankAngle, uint32_t currMicros, const config4 &page4) const
Definition crank_angle_calculator.cpp:94
A crank angle calculator that computes a temporal adjustment based on the gap between the 2 most rece...
Definition crank_angle_calculator.h:44
uint16_t _toothAngle
Tooth angle (1-359°)
Definition crank_angle_calculator.h:47
uint32_t _toothLastToothTime
Time in µS that the current tooth was last detected.
Definition crank_angle_calculator.h:45
tooth_interval_calculator_t()=default
int16_t calculate(uint32_t currMicros) const
Definition crank_angle_calculator.cpp:27
uint32_t _toothLastMinusOneToothTime
Time in µS that the tooth before the last tooth was detected.
Definition crank_angle_calculator.h:46
bool _toothAngleCorrect
Is _toothAngle valid.
Definition crank_angle_calculator.h:48
Definition crank_angle_calculator.h:140
trigger_angle_crank_angle_calculator_t()=default
int16_t calculateCrankAngle(uint32_t currMicros, const config4 &page4) const
Calculate the crank angle.
Definition crank_angle_calculator.cpp:124