![]() |
Speeduino
|
#include <limits.h>#include "globals.h"#include "decoders.h"#include "elapsed_time.h"#include "scheduler.h"#include "crankMaths.h"#include "timers.h"#include "unit_testing.h"#include "atomic.h"#include "decoder_init.h"#include "decoder_builder.h"#include "scheduledIO_ign.h"#include "src/pins/boardInputPin.h"#include "scheduler_ignition_controller.h"#include "src/decoders/shared/crank_angle_calculator.h"#include "src/decoders/shared/decoder_state.h"#include "src/decoders/shared/perToothIgnition.h"#include "src/decoders/shared/rev_time_calcs.h"#include "src/decoders/missingTooth.h"#include "src/decoders/dualWheel.h"#include "src/decoders/basicDistributor.h"Macros | |
| #define | TOOTH_CRANK 0 |
| #define | TOOTH_CAM_SECONDARY 1 |
| #define | TOOTH_CAM_TERTIARY 2 |
| #define | ID_TOOTH_PATTERN 0 |
| #define | SKIP_TOOTH1 1 |
| #define | SKIP_TOOTH2 2 |
| #define | SKIP_TOOTH3 3 |
| #define | SKIP_TOOTH4 4 |
| #define | secondaryToothLastCount _decoderState.checkSyncToothCount |
| #define | renixSystemLastToothTime _decoderState.toothLastToothRisingTime |
| #define | renixSystemLastMinusOneToothTime _decoderState.toothLastSecToothRisingTime |
Variables | |
| TESTABLE_STATIC state_t | _decoderState |
| constexpr uint8_t | COMPOSITE_LOG_PRI = 0 |
| constexpr uint8_t | COMPOSITE_LOG_SEC = 1 |
| constexpr uint8_t | COMPOSITE_LOG_THIRD = 2 |
| constexpr uint8_t | COMPOSITE_LOG_TRIG = 3 |
| constexpr uint8_t | COMPOSITE_LOG_SYNC = 4 |
| constexpr uint8_t | COMPOSITE_ENGINE_CYCLE = 5 |
| volatile unsigned long | roverMEMSTeethSeen = 0 |
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):
Each decoder must utilise at least the following variables:
| #define ID_TOOTH_PATTERN 0 |
| #define SKIP_TOOTH1 1 |
| #define SKIP_TOOTH2 2 |
| #define SKIP_TOOTH3 3 |
| #define SKIP_TOOTH4 4 |
| #define TOOTH_CAM_SECONDARY 1 |
| #define TOOTH_CAM_TERTIARY 2 |
| #define TOOTH_CRANK 0 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| decoder_t triggerSetup_DRZ400 | ( | void | ) |
| decoder_t triggerSetup_DualWheel | ( | void | ) |
| decoder_t triggerSetup_missingTooth | ( | void | ) |
Setup function for each decoder type.
|
static |
| TESTABLE_STATIC state_t _decoderState |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |