Speeduino
|
Universal (shared between decoders) decoder routines.
Add tooth log entry to toothHistory (array). Enabled by (either) currentStatus.toothLogEnabled and currentStatus.compositeTriggerUsed.
toothTime | - Tooth Time |
whichTooth | - 0 for Primary (Crank), 2 for Secondary (Cam) 3 for Tertiary (Cam) |
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)
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)
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.
Interrupt handler for secondary trigger. As loggerPrimaryISR, but for the secondary trigger.
Interrupt handler for third trigger. As loggerPrimaryISR, but for the third trigger.
Sets the new filter time based on the current settings. This ONLY works for even spaced decoders.
Compute RPM. As nearly all the decoders use a common method of determining RPM (The time the last full revolution took) A common function is simpler.
degreesOver | - the number of crank degrees between tooth #1s. Some patterns have a tooth #1 every crank rev, others are every cam rev. |