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

A crank angle calculator that computes the initial crank angle from a tooth angle. More...

#include <crank_angle_calculator.h>

Inheritance diagram for compute_initial_calculator_t:
compute_crank_angle_calculator_tooth_interval_t trigger_angle_crank_angle_calculator_t

Public Attributes

uint16_t _toothCurrentCount = 0
 1-based tooth number
 
uint16_t _toothAngle = 0
 Tooth angle (1-359°)
 

Protected Member Functions

 compute_initial_calculator_t ()=default
 
 compute_initial_calculator_t (uint16_t toothCurrentCount, uint16_t toothAngle)
 
int16_t calculate (void) const
 

Detailed Description

A crank angle calculator that computes the initial crank angle from a tooth angle.

Useful when the teeth are evenly spaced and the same width

Constructor & Destructor Documentation

◆ compute_initial_calculator_t() [1/2]

compute_initial_calculator_t::compute_initial_calculator_t ( )
protecteddefault

◆ compute_initial_calculator_t() [2/2]

compute_initial_calculator_t::compute_initial_calculator_t ( uint16_t  toothCurrentCount,
uint16_t  toothAngle 
)
explicitprotected

Member Function Documentation

◆ calculate()

int16_t compute_initial_calculator_t::calculate ( void  ) const
protected

Member Data Documentation

◆ _toothAngle

uint16_t compute_initial_calculator_t::_toothAngle = 0

Tooth angle (1-359°)

◆ _toothCurrentCount

uint16_t compute_initial_calculator_t::_toothCurrentCount = 0

1-based tooth number


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