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

A crank angle calculator that computes a temporal adjustment based on the gap between the 2 most recent teeth rather than the last full revolution. More...

#include <crank_angle_calculator.h>

Inheritance diagram for tooth_interval_calculator_t:
compute_crank_angle_calculator_tooth_interval_t lookup_crank_angle_calculator_tooth_interval_t

Public Attributes

uint32_t _toothLastToothTime = 0
 Time in µS that the current tooth was last detected.
 
uint32_t _toothLastMinusOneToothTime = 0
 Time in µS that the tooth before the last tooth was detected.
 
uint16_t _toothAngle = 0
 Tooth angle (1-359°)
 
bool _toothAngleCorrect
 Is _toothAngle valid.
 

Protected Member Functions

 tooth_interval_calculator_t ()=default
 
 tooth_interval_calculator_t (uint32_t toothLastToothTime, uint32_t toothLastMinusOneToothTime, uint16_t toothAngle, bool toothAngleCorrect)
 
int16_t calculate (uint32_t currMicros) const
 

Detailed Description

A crank angle calculator that computes a temporal adjustment based on the gap between the 2 most recent teeth rather than the last full revolution.

Constructor & Destructor Documentation

◆ tooth_interval_calculator_t() [1/2]

tooth_interval_calculator_t::tooth_interval_calculator_t ( )
protecteddefault

◆ tooth_interval_calculator_t() [2/2]

tooth_interval_calculator_t::tooth_interval_calculator_t ( uint32_t  toothLastToothTime,
uint32_t  toothLastMinusOneToothTime,
uint16_t  toothAngle,
bool  toothAngleCorrect 
)
explicitprotected

Member Function Documentation

◆ calculate()

int16_t tooth_interval_calculator_t::calculate ( uint32_t  currMicros) const
protected

Member Data Documentation

◆ _toothAngle

uint16_t tooth_interval_calculator_t::_toothAngle = 0

Tooth angle (1-359°)

◆ _toothAngleCorrect

bool tooth_interval_calculator_t::_toothAngleCorrect

Is _toothAngle valid.

◆ _toothLastMinusOneToothTime

uint32_t tooth_interval_calculator_t::_toothLastMinusOneToothTime = 0

Time in µS that the tooth before the last tooth was detected.

◆ _toothLastToothTime

uint32_t tooth_interval_calculator_t::_toothLastToothTime = 0

Time in µS that the current tooth was last detected.


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