Universal (shared between decoders) decoder routines.
◆ TRIGGER_FILTER_AGGRESSIVE
| #define TRIGGER_FILTER_AGGRESSIVE 3 |
◆ TRIGGER_FILTER_LITE
| #define TRIGGER_FILTER_LITE 1 |
◆ TRIGGER_FILTER_MEDIUM
| #define TRIGGER_FILTER_MEDIUM 2 |
◆ TRIGGER_FILTER_OFF
| #define TRIGGER_FILTER_OFF 0 |
◆ addToothLogEntry()
| static void addToothLogEntry |
( |
unsigned long |
toothTime, |
|
|
byte |
whichTooth |
|
) |
| |
|
inlinestatic |
Add tooth log entry to toothHistory (array). Enabled by (either) currentStatus.toothLogEnabled and currentStatus.compositeTriggerUsed.
- Parameters
-
| toothTime | - Tooth Time |
| whichTooth | - 0 for Primary (Crank), 2 for Secondary (Cam) 3 for Tertiary (Cam) |
◆ checkPerToothTiming()
| static void checkPerToothTiming |
( |
int16_t |
crankAngle, |
|
|
uint16_t |
currentTooth |
|
) |
| |
|
inlinestatic |
On decoders that are enabled for per tooth based timing adjustments, this function performs the timer compare changes on the schedules themselves For each ignition channel, a check is made whether we're at the relevant tooth and whether that ignition schedule is currently running Only if both these conditions are met will the schedule be updated with the latest timing information. If it's the correct tooth, but the schedule is not yet started, calculate and an end compare value (This situation occurs when both the start and end of the ignition pulse happen after the end tooth, but before the next tooth)
◆ crankingGetRPM()
| static int crankingGetRPM |
( |
byte |
totalTeeth, |
|
|
bool |
isCamTeeth |
|
) |
| |
|
static |
This is a special case of RPM measure that is based on the time between the last 2 teeth rather than the time of the last full revolution. This gives much more volatile reading, but is quite useful during cranking, particularly on low resolution patterns. It can only be used on patterns where the teeth are evenly spaced. It takes an argument of the full (COMPLETE) number of teeth per revolution. For a missing tooth wheel, this is the number if the tooth had NOT been missing (Eg 36-1 = 36)
◆ getConfigPriTriggerEdge()
| static uint8_t getConfigPriTriggerEdge |
( |
const config4 & |
page4 | ) |
|
|
static |
◆ getConfigSecTriggerEdge()
| static uint8_t getConfigSecTriggerEdge |
( |
const config4 & |
page4 | ) |
|
|
static |
◆ getConfigTerTriggerEdge()
| static uint8_t getConfigTerTriggerEdge |
( |
const config10 & |
page10 | ) |
|
|
static |
◆ IsCranking()
| static bool IsCranking |
( |
const statuses & |
status | ) |
|
|
inlinestatic |
◆ loggerPrimaryISR()
| void loggerPrimaryISR |
( |
void |
| ) |
|
Interrupt handler for primary trigger. This function is called on both the rising and falling edges of the primary trigger, when either the composite or tooth loggers are turned on.
◆ loggerSecondaryISR()
| void loggerSecondaryISR |
( |
void |
| ) |
|
Interrupt handler for secondary trigger. As loggerPrimaryISR, but for the secondary trigger.
◆ loggerTertiaryISR()
| void loggerTertiaryISR |
( |
void |
| ) |
|
Interrupt handler for third trigger. As loggerPrimaryISR, but for the third trigger.
◆ RpmFromRevolutionTimeUs()
| static uint16_t RpmFromRevolutionTimeUs |
( |
uint32_t |
revTime | ) |
|
|
inlinestatic |
◆ setFilter()
| static void setFilter |
( |
unsigned long |
curGap | ) |
|
|
static |
Sets the new filter time based on the current settings. This ONLY works for even spaced decoders.
◆ SetRevolutionTime()
◆ sharedDecoderReset()
| static void sharedDecoderReset |
( |
void |
| ) |
|
|
static |
◆ sharedEngineIsRunning()
◆ sharedGetDecoderFeatures()
◆ sharedGetStatus()
◆ stdGetRPM()
| static uint16_t stdGetRPM |
( |
bool |
isCamTeeth | ) |
|
|
static |
◆ timeToAngleIntervalTooth()
◆ UpdateRevolutionTimeFromTeeth()
| static bool UpdateRevolutionTimeFromTeeth |
( |
bool |
isCamTeeth | ) |
|
|
static |
◆ decoderFeatures