Speeduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lookup_crank_angle_calculator_t Struct Reference

#include <crank_angle_calculator.h>

Inheritance diagram for lookup_crank_angle_calculator_t:
last_tooth_rev_calculator_t sequential_correction_calculator_t lookup_initial_calculator_t

Public Member Functions

 lookup_crank_angle_calculator_t ()=default
 
 lookup_crank_angle_calculator_t (const std::tuple< uint32_t, bool, uint16_t > &data)
 
int16_t calculateCrankAngle (uint32_t currMicros, const int16_t toothAngles[], const config4 &page4) const
 Calculate the crank angle.
 

Additional Inherited Members

- Public Attributes inherited from last_tooth_rev_calculator_t
uint32_t _toothLastToothTime = 0
 Time in µS that the current tooth was last detected.
 
- Public Attributes inherited from sequential_correction_calculator_t
bool _revZeroOrOne = false
 When calculating over 720°, tells the calculator if we are in the 1st revolution (false) or the 2nd (true)
 
- Public Attributes inherited from lookup_initial_calculator_t
uint16_t _toothCurrentCount = 0
 1-based tooth number
 
- Protected Member Functions inherited from last_tooth_rev_calculator_t
 last_tooth_rev_calculator_t ()=default
 
 last_tooth_rev_calculator_t (uint32_t toothLastToothTime)
 
int16_t calculate (uint32_t currMicros) const
 
- Protected Member Functions inherited from sequential_correction_calculator_t
 sequential_correction_calculator_t ()=default
 
 sequential_correction_calculator_t (bool revZeroOrOne)
 
int16_t calculate (const config4 &page4) const
 
- Protected Member Functions inherited from lookup_initial_calculator_t
 lookup_initial_calculator_t ()=default
 
 lookup_initial_calculator_t (uint16_t toothCurrentCount)
 
int16_t calculate (const int16_t toothAngles[]) const
 Calculate the crank angle.
 

Constructor & Destructor Documentation

◆ lookup_crank_angle_calculator_t() [1/2]

lookup_crank_angle_calculator_t::lookup_crank_angle_calculator_t ( )
default

◆ lookup_crank_angle_calculator_t() [2/2]

lookup_crank_angle_calculator_t::lookup_crank_angle_calculator_t ( const std::tuple< uint32_t, bool, uint16_t > &  data)
explicit

Member Function Documentation

◆ calculateCrankAngle()

int16_t lookup_crank_angle_calculator_t::calculateCrankAngle ( uint32_t  currMicros,
const int16_t  toothAngles[],
const config4 &  page4 
) const

Calculate the crank angle.

Parameters
currMicrosCurrent time in µS. Usually the result of a call to micros()
toothAnglesArray to lookup. Note that teeth numbers are 1-based, but arrays are 0-based
page4The tune

The documentation for this struct was generated from the following files: