16 return operationMode ==
TWO_STROKE ? 360 : FOUR_STROKE_ENGINE_CYCLE;
23 float toothWidthPercentage,
float offset,
float engineCycle,
float filterLeft,
float filterRight) {
24 criticalAssertVoid(totalTeethCount > 0,
"total count");
25 criticalAssertVoid(skippedCount >= 0,
"skipped count");
26 criticalAssertVoid(toothWidthPercentage < 1,
"toothWidthPercentage");
28 float oneTooth = engineCycle / totalTeethCount;
30 for (
int i = 0; i < totalTeethCount - skippedCount - 1; i++) {
31 float angleDown = oneTooth * (i + (1 - toothWidthPercentage));
32 float angleUp = oneTooth * (i + 1);
37 float angleDown = oneTooth * (totalTeethCount - skippedCount - 1 + (1 - toothWidthPercentage));
45 if (totalTeethCount <= 0) {
59 if (totalTeethCount > 6 && skippedCount > 0) {
68 NO_LEFT_FILTER, NO_RIGHT_FILTER);
88 const float crankW = 360 / 3 / 2;
124 float engineCycle = FOUR_STROKE_ENGINE_CYCLE;
129 float toothWidth = 3 / 20.0;
132 NO_LEFT_FILTER, 720 - 39);
156 for (
size_t i = 0; i < 2; i++) {
165 float width = 360 /
count;
void firmwareError(ObdCode code, const char *fmt,...)
@ CUSTOM_OBD_TRIGGER_WAVEFORM
@ FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_CRANK_SENSOR
@ FOUR_STROKE_SIX_TIMES_CRANK_SENSOR
void configure3ToothCrank(TriggerWaveform *s)
void configureQuickStartSenderWheel(TriggerWaveform *s)
void configureKawaKX450F(TriggerWaveform *s)
void configureOnePlusOne(TriggerWaveform *s)
void addSkippedToothTriggerEvents(TriggerWheel wheel, TriggerWaveform *s, int totalTeethCount, int skippedCount, float toothWidthPercentage, float offset, float engineCycle, float filterLeft, float filterRight)
void configure12ToothCrank(TriggerWaveform *s)
angle_t getEngineCycle(operation_mode_e operationMode)
static void commonSymmetrical(TriggerWaveform *s, int count, float gapFrom, float gapTo)
void initializeSkippedToothTrigger(TriggerWaveform *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode, SyncEdge syncEdge)
void configure3_1_cam(TriggerWaveform *s)
void configure6ToothCrank(TriggerWaveform *s)