|
| static void | triggerRoverMEMSCommon (void) |
| |
| static void | triggerRecordVVT1Angle (void) |
| |
| static void | addToothLogEntry (unsigned long toothTime, byte whichTooth) |
| |
| void | loggerPrimaryISR (void) |
| |
| void | loggerSecondaryISR (void) |
| |
| void | loggerTertiaryISR (void) |
| |
| static decoder_status_t | sharedGetStatus (void) |
| |
| static uint16_t | timeToAngleIntervalTooth (uint32_t time) |
| |
| static bool | IsCranking (const statuses &status) |
| |
| TESTABLE_STATIC bool | sharedEngineIsRunning (uint32_t curTime) |
| |
| static decoder_features_t | sharedGetDecoderFeatures (void) |
| |
| static void | sharedDecoderReset (void) |
| |
| TESTABLE_STATIC bool | SetRevolutionTime (uint32_t revTime) |
| |
| static bool | UpdateRevolutionTimeFromTeeth (bool isCamTeeth) |
| |
| static uint16_t | RpmFromRevolutionTimeUs (uint32_t revTime) |
| |
| static uint16_t | stdGetRPM (bool isCamTeeth) |
| |
| static void | setFilter (unsigned long curGap) |
| |
| static int | crankingGetRPM (byte totalTeeth, bool isCamTeeth) |
| |
| static void | checkPerToothTiming (int16_t crankAngle, uint16_t currentTooth) |
| |
| static uint8_t | getConfigPriTriggerEdge (const config4 &page4) |
| |
| static uint8_t | getConfigSecTriggerEdge (const config4 &page4) |
| |
| static uint8_t | getConfigTerTriggerEdge (const config10 &page10) |
| |
| static void | triggerPri_missingTooth (void) |
| |
| static void | triggerSec_missingTooth (void) |
| |
| static void | triggerThird_missingTooth (void) |
| |
| static uint16_t | getRPM_missingTooth (void) |
| |
| static int16_t | getCrankAngle_missingTooth (void) |
| |
| static uint16_t | clampToToothCount (int16_t toothNum, uint8_t toothAdder) |
| |
| static uint16_t | clampToActualTeeth (uint16_t toothNum, uint8_t toothAdder) |
| |
| static uint16_t | calcEndTeeth_missingTooth (int endAngle, uint8_t toothAdder) |
| |
| static void | triggerSetEndTeeth_missingTooth (void) |
| |
| decoder_t | triggerSetup_missingTooth (void) |
| | Setup function for each decoder type.
|
| |
| static void | triggerPri_DualWheel (void) |
| |
| static void | triggerSec_DualWheel (void) |
| |
| static uint16_t | getRPM_DualWheel (void) |
| |
| static int16_t | getCrankAngle_DualWheel (void) |
| |
| static uint16_t | calcEndTeeth_DualWheel (int ignitionAngle, uint8_t toothAdder) |
| |
| static void | triggerSetEndTeeth_DualWheel (void) |
| |
| decoder_t | triggerSetup_DualWheel (void) |
| |
| static void | triggerPri_BasicDistributor (void) |
| |
| static uint16_t | getRPM_BasicDistributor (void) |
| |
| static int16_t | getCrankAngle_BasicDistributor (void) |
| |
| static void | triggerSetEndTeeth_BasicDistributor (void) |
| |
| decoder_t | triggerSetup_BasicDistributor (void) |
| |
| static void | triggerPri_GM7X (void) |
| |
| static uint16_t | getRPM_GM7X (void) |
| |
| static int16_t | getCrankAngle_GM7X (void) |
| |
| static void | triggerSetEndTeeth_GM7X (void) |
| |
| decoder_t | triggerSetup_GM7X (void) |
| |
| static void | triggerPri_4G63 (void) |
| |
| static void | triggerSec_4G63 (void) |
| |
| static uint16_t | getRPM_4G63 (void) |
| |
| static int16_t | getCrankAngle_4G63 (void) |
| |
| static void | triggerSetEndTeeth_4G63 (void) |
| |
| decoder_t | triggerSetup_4G63 (void) |
| |
| static void | triggerPri_24X (void) |
| |
| static void | triggerSec_24X (void) |
| |
| static uint16_t | getRPM_24X (void) |
| |
| static int16_t | getCrankAngle_24X (void) |
| |
| decoder_t | triggerSetup_24X (void) |
| |
| static void | triggerPri_Jeep2000 (void) |
| |
| static void | triggerSec_Jeep2000 (void) |
| |
| static uint16_t | getRPM_Jeep2000 (void) |
| |
| static int16_t | getCrankAngle_Jeep2000 (void) |
| |
| decoder_t | triggerSetup_Jeep2000 (void) |
| |
| static void | triggerPri_Audi135 (void) |
| |
| static void | triggerSec_Audi135 (void) |
| |
| static uint16_t | getRPM_Audi135 (void) |
| |
| static int16_t | getCrankAngle_Audi135 (void) |
| |
| decoder_t | triggerSetup_Audi135 (void) |
| |
| static void | triggerPri_HondaD17 (void) |
| |
| static uint16_t | getRPM_HondaD17 (void) |
| |
| static int16_t | getCrankAngle_HondaD17 (void) |
| |
| decoder_t | triggerSetup_HondaD17 (void) |
| |
| static void | triggerPri_HondaJ32 (void) |
| |
| static uint16_t | getRPM_HondaJ32 (void) |
| |
| static int16_t | getCrankAngle_HondaJ32 (void) |
| |
| decoder_t | triggerSetup_HondaJ32 (void) |
| |
| static void | triggerPri_Miata9905 (void) |
| |
| static void | triggerSec_Miata9905 (void) |
| |
| static uint16_t | getRPM_Miata9905 (void) |
| |
| static int16_t | getCrankAngle_Miata9905 (void) |
| |
| int | getCamAngle_Miata9905 (void) |
| |
| static void | triggerSetEndTeeth_Miata9905 (void) |
| |
| decoder_t | triggerSetup_Miata9905 (void) |
| |
| static void | triggerPri_MazdaAU (void) |
| |
| static void | triggerSec_MazdaAU (void) |
| |
| static uint16_t | getRPM_MazdaAU (void) |
| |
| static int16_t | getCrankAngle_MazdaAU (void) |
| |
| decoder_t | triggerSetup_MazdaAU (void) |
| |
| static uint16_t | getRPM_non360 (void) |
| |
| static int16_t | getCrankAngle_non360 (void) |
| |
| decoder_t | triggerSetup_non360 (void) |
| |
| static void | triggerPri_Nissan360 (void) |
| |
| static void | triggerSec_Nissan360 (void) |
| |
| static uint16_t | getRPM_Nissan360 (void) |
| |
| static int16_t | getCrankAngle_Nissan360 (void) |
| |
| static void | triggerSetEndTeeth_Nissan360 (void) |
| |
| decoder_t | triggerSetup_Nissan360 (void) |
| |
| static void | triggerPri_Subaru67 (void) |
| |
| static void | triggerSec_Subaru67 (void) |
| |
| static uint16_t | getRPM_Subaru67 (void) |
| |
| static int16_t | getCrankAngle_Subaru67 (void) |
| |
| static void | triggerSetEndTeeth_Subaru67 (void) |
| |
| decoder_t | triggerSetup_Subaru67 (void) |
| |
| static void | triggerPri_Daihatsu (void) |
| |
| static uint16_t | getRPM_Daihatsu (void) |
| |
| static int16_t | getCrankAngle_Daihatsu (void) |
| |
| decoder_t | triggerSetup_Daihatsu (void) |
| |
| static void | triggerPri_Harley (void) |
| |
| static uint16_t | getRPM_Harley (void) |
| |
| static int16_t | getCrankAngle_Harley (void) |
| |
| decoder_t | triggerSetup_Harley (void) |
| |
| static void | triggerPri_ThirtySixMinus222 (void) |
| |
| static uint16_t | getRPM_ThirtySixMinus222 (void) |
| |
| static void | triggerSetEndTeeth_ThirtySixMinus222 (void) |
| |
| decoder_t | triggerSetup_ThirtySixMinus222 (void) |
| |
| static void | triggerPri_ThirtySixMinus21 (void) |
| |
| static uint16_t | getRPM_ThirtySixMinus21 (void) |
| |
| static void | triggerSetEndTeeth_ThirtySixMinus21 (void) |
| |
| decoder_t | triggerSetup_ThirtySixMinus21 (void) |
| |
| static void | triggerPri_420a (void) |
| |
| static void | triggerSec_420a (void) |
| |
| static uint16_t | getRPM_420a (void) |
| |
| static int16_t | getCrankAngle_420a (void) |
| |
| static void | triggerSetEndTeeth_420a (void) |
| |
| decoder_t | triggerSetup_420a (void) |
| |
| static void | triggerPri_Webber (void) |
| |
| static void | triggerSec_Webber (void) |
| |
| decoder_t | triggerSetup_Webber (void) |
| |
| static void | triggerSec_FordST170 (void) |
| |
| static uint16_t | getRPM_FordST170 (void) |
| |
| static int16_t | getCrankAngle_FordST170 (void) |
| |
| static uint16_t | calcSetEndTeeth_FordST170 (int ignitionAngle, uint8_t toothAdder) |
| |
| static void | triggerSetEndTeeth_FordST170 (void) |
| |
| decoder_t | triggerSetup_FordST170 (void) |
| |
| static void | triggerSec_DRZ400 (void) |
| |
| decoder_t | triggerSetup_DRZ400 (void) |
| |
| static void | triggerPri_NGC (void) |
| |
| static void | triggerSec_NGC4 (void) |
| |
| static void | triggerSec_NGC68 (void) |
| |
| static uint16_t | getRPM_NGC (void) |
| |
| static uint16_t | calcSetEndTeeth_NGC_SkipMissing (uint16_t toothNum) |
| |
| static uint16_t | calcSetEndTeeth_NGC (int ignitionAngle, uint8_t toothAdder) |
| |
| static void | triggerSetEndTeeth_NGC (void) |
| |
| decoder_t | triggerSetup_NGC (void) |
| |
| static void | triggerPri_Vmax (void) |
| |
| static uint16_t | getRPM_Vmax (void) |
| |
| static int16_t | getCrankAngle_Vmax (void) |
| |
| decoder_t | triggerSetup_Vmax (void) |
| |
| static void | triggerPri_Renix (void) |
| |
| static uint16_t | calcEndTeeth_Renix (int ignitionAngle, uint8_t toothAdder) |
| |
| static void | triggerSetEndTeeth_Renix (void) |
| |
| decoder_t | triggerSetup_Renix (void) |
| |
| static void | triggerPri_RoverMEMS (void) |
| |
| static void | triggerSec_RoverMEMS (void) |
| |
| static uint16_t | getRPM_RoverMEMS (void) |
| |
| static void | triggerSetEndTeeth_RoverMEMS (void) |
| |
| decoder_t | triggerSetup_RoverMEMS (void) |
| |
| static void | triggerPri_SuzukiK6A (void) |
| |
| static uint16_t | getRPM_SuzukiK6A (void) |
| |
| static int16_t | getCrankAngle_SuzukiK6A (void) |
| |
| static uint16_t | calcEndTeeth_SuzukiK6A (int ignitionAngle) |
| |
| static void | triggerSetEndTeeth_SuzukiK6A (void) |
| |
| decoder_t | triggerSetup_SuzukiK6A (void) |
| |
| static void | triggerPri_FordTFI (void) |
| |
| static void | triggerSec_FordTFI (void) |
| |
| static uint16_t | getRPM_FordTFI (void) |
| |
| static int16_t | getCrankAngle_FordTFI (void) |
| |
| static void | triggerSetEndTeeth_FordTFI (void) |
| |
| decoder_t | triggerSetup_FordTFI (void) |
| |
| static void | initTriggerPin (uint8_t pin, port_register_t &pinPort, pin_mask_t &pinMask) |
| |
| void | initDecoderPins (uint8_t primaryPin, uint8_t secondaryPin, uint8_t tertiaryPin) |
| | Set the input pins for the decoders. Pin numbers are pulled from the tune.
|
| |
Crank and Cam decoders
This file contains the various crank and cam wheel decoder functions. Each decoder must have the following 4 functions (Where xxxx is the decoder name):
- triggerSetup_xxxx - Called once from within setup() and configures any required variables
- triggerPri_xxxx - Called each time the primary (No. 1) crank/cam signal is triggered (Called as an interrupt, so variables must be declared volatile)
- triggerSec_xxxx - Called each time the secondary (No. 2) crank/cam signal is triggered (Called as an interrupt, so variables must be declared volatile)
- getRPM_xxxx - Returns the current RPM, as calculated by the decoder
- getCrankAngle_xxxx - Returns the current crank angle, as calculated by the decoder
- getCamAngle_xxxx - Returns the current CAM angle, as calculated by the decoder
Each decoder must utilise at least the following variables:
- toothLastToothTime - The time (In uS) that the last primary tooth was 'seen'