Speeduino
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
decoders::shared::state_t Struct Reference

#include <decoder_state.h>

Public Member Functions

void setFilter (unsigned long curGap, const config4 &page4)
 
void reset (void)
 Reset tooth statues & times.
 
bool toothWithinMaxStallTime (uint32_t curTime)
 Check how long ago the last tooth was seen compared to now. If it was more than MAX_STALL_TIME then the engine is probably stopped.
 
void setTriggerToothAngle (uint16_t angle)
 Set the angle between teeth.
 
uint16_t clampToActualTeeth (const config4 &page4, uint16_t toothNum, uint8_t toothAdder) const
 
int16_t toothNumFromScheduleAngles (const config4 &page4, const IgnitionSchedule &schedule) const
 

Public Attributes

volatile unsigned long curGap = 0U
 
volatile unsigned long curGap2 = 0U
 
volatile unsigned long curGap3 = 0U
 
volatile unsigned long lastGap = 0U
 
volatile unsigned long targetGap = 0U
 
unsigned long MAX_STALL_TIME = 0U
 
uint16_t toothCurrentCount = 0
 
volatile byte toothSystemCount = 0
 
volatile unsigned long toothSystemLastToothTime = 0
 
volatile uint32_t toothLastToothTime = 0
 
volatile unsigned long toothLastSecToothTime = 0
 
volatile unsigned long toothLastThirdToothTime = 0
 
volatile uint32_t toothLastMinusOneToothTime = 0
 
volatile unsigned long toothLastMinusOneSecToothTime = 0
 
volatile unsigned long toothLastToothRisingTime = 0
 
volatile unsigned long toothLastSecToothRisingTime = 0
 
volatile unsigned long targetGap2 = 0
 
volatile unsigned long targetGap3 = 0
 
volatile unsigned long toothOneTime = 0
 
volatile unsigned long toothOneMinusOneTime = 0
 
volatile unsigned long lastSyncRevolution = 0
 
volatile bool revolutionOne = 0
 
uint16_t triggerActualTeeth = 0
 
volatile uint16_t secondaryToothCount = 0
 
volatile unsigned long triggerFilterTime = 0
 
volatile unsigned long triggerSecFilterTime = 0
 
volatile unsigned long triggerThirdFilterTime = 0
 
volatile uint16_t triggerToothAngle = 0
 
uint8_t checkSyncToothCount = 0
 
unsigned long lastVVTtime = 0
 
uint16_t ignitionEndTeeth [IGN_CHANNELS] {}
 
int16_t toothAngles [24] {}
 
decoder_status_t decoderStatus {}
 
decoder_features_t decoderFeatures {}
 

Member Function Documentation

◆ clampToActualTeeth()

uint16_t decoders::shared::state_t::clampToActualTeeth ( const config4 &  page4,
uint16_t  toothNum,
uint8_t  toothAdder 
) const
inline

◆ reset()

void decoders::shared::state_t::reset ( void  )

Reset tooth statues & times.

◆ setFilter()

void decoders::shared::state_t::setFilter ( unsigned long  curGap,
const config4 &  page4 
)

Sets the new filter time based on the current settings. This ONLY works for even spaced decoders.

◆ setTriggerToothAngle()

void decoders::shared::state_t::setTriggerToothAngle ( uint16_t  angle)

Set the angle between teeth.

This ONLY works for even spaced decoders.

◆ toothNumFromScheduleAngles()

int16_t decoders::shared::state_t::toothNumFromScheduleAngles ( const config4 &  page4,
const IgnitionSchedule &  schedule 
) const
inline

◆ toothWithinMaxStallTime()

bool decoders::shared::state_t::toothWithinMaxStallTime ( uint32_t  curTime)

Check how long ago the last tooth was seen compared to now. If it was more than MAX_STALL_TIME then the engine is probably stopped.

Parameters
curTime"now" time in microseconds
Returns
true if curTime less than MAX_STALL_TIME, false otherwise

Member Data Documentation

◆ checkSyncToothCount

uint8_t decoders::shared::state_t::checkSyncToothCount = 0

◆ curGap

volatile unsigned long decoders::shared::state_t::curGap = 0U

◆ curGap2

volatile unsigned long decoders::shared::state_t::curGap2 = 0U

◆ curGap3

volatile unsigned long decoders::shared::state_t::curGap3 = 0U

◆ decoderFeatures

decoder_features_t decoders::shared::state_t::decoderFeatures {}

◆ decoderStatus

decoder_status_t decoders::shared::state_t::decoderStatus {}

◆ ignitionEndTeeth

uint16_t decoders::shared::state_t::ignitionEndTeeth[IGN_CHANNELS] {}

◆ lastGap

volatile unsigned long decoders::shared::state_t::lastGap = 0U

◆ lastSyncRevolution

volatile unsigned long decoders::shared::state_t::lastSyncRevolution = 0

◆ lastVVTtime

unsigned long decoders::shared::state_t::lastVVTtime = 0

◆ MAX_STALL_TIME

unsigned long decoders::shared::state_t::MAX_STALL_TIME = 0U

◆ revolutionOne

volatile bool decoders::shared::state_t::revolutionOne = 0

◆ secondaryToothCount

volatile uint16_t decoders::shared::state_t::secondaryToothCount = 0

◆ targetGap

volatile unsigned long decoders::shared::state_t::targetGap = 0U

◆ targetGap2

volatile unsigned long decoders::shared::state_t::targetGap2 = 0

◆ targetGap3

volatile unsigned long decoders::shared::state_t::targetGap3 = 0

◆ toothAngles

int16_t decoders::shared::state_t::toothAngles[24] {}

◆ toothCurrentCount

uint16_t decoders::shared::state_t::toothCurrentCount = 0

◆ toothLastMinusOneSecToothTime

volatile unsigned long decoders::shared::state_t::toothLastMinusOneSecToothTime = 0

◆ toothLastMinusOneToothTime

volatile uint32_t decoders::shared::state_t::toothLastMinusOneToothTime = 0

◆ toothLastSecToothRisingTime

volatile unsigned long decoders::shared::state_t::toothLastSecToothRisingTime = 0

◆ toothLastSecToothTime

volatile unsigned long decoders::shared::state_t::toothLastSecToothTime = 0

◆ toothLastThirdToothTime

volatile unsigned long decoders::shared::state_t::toothLastThirdToothTime = 0

◆ toothLastToothRisingTime

volatile unsigned long decoders::shared::state_t::toothLastToothRisingTime = 0

◆ toothLastToothTime

volatile uint32_t decoders::shared::state_t::toothLastToothTime = 0

◆ toothOneMinusOneTime

volatile unsigned long decoders::shared::state_t::toothOneMinusOneTime = 0

◆ toothOneTime

volatile unsigned long decoders::shared::state_t::toothOneTime = 0

◆ toothSystemCount

volatile byte decoders::shared::state_t::toothSystemCount = 0

◆ toothSystemLastToothTime

volatile unsigned long decoders::shared::state_t::toothSystemLastToothTime = 0

◆ triggerActualTeeth

uint16_t decoders::shared::state_t::triggerActualTeeth = 0

◆ triggerFilterTime

volatile unsigned long decoders::shared::state_t::triggerFilterTime = 0

◆ triggerSecFilterTime

volatile unsigned long decoders::shared::state_t::triggerSecFilterTime = 0

◆ triggerThirdFilterTime

volatile unsigned long decoders::shared::state_t::triggerThirdFilterTime = 0

◆ triggerToothAngle

volatile uint16_t decoders::shared::state_t::triggerToothAngle = 0

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