rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
trigger_misc.h File Reference

Functions

void configureFiatIAQ_P8 (TriggerWaveform *s)
 
void configureDaihatsu3cyl (TriggerWaveform *s)
 
void configureDaihatsu4cyl (TriggerWaveform *s)
 
void configureFordPip (TriggerWaveform *s)
 
void configureFordST170 (TriggerWaveform *s)
 
void configureTriTach (TriggerWaveform *s)
 
void configureBarra3plus1cam (TriggerWaveform *s)
 
void configureBenelli (TriggerWaveform *s)
 
void configure60degSingleTooth (TriggerWaveform *s)
 Configure trigger as Sovek or Saruman ignition.
 
void configureArcticCat (TriggerWaveform *s)
 

Function Documentation

◆ configure60degSingleTooth()

void configure60degSingleTooth ( TriggerWaveform s)

Configure trigger as Sovek or Saruman ignition.

Parameters
sTrigger waveform visitor to config
Todo:
My approach was to utilize Both especially for single tooth and manual kikstarter, to be ready on both sides of blind. But unfortuneally, my experiments show me the Trigger can't become syncronized by 'last' and folowed 'first' events only. Also I observe phase-aligment mehanism is trying to consume a longer side of trigger as latest before TDC. I wish to setup SyncEdge::Both for my TT_60DEG_TOOTH after this case of scenario become work well. For now, Rise work well for my 60 degree trigger and both edges phase sync work as mush as expected for my engine startup.

Definition at line 179 of file trigger_misc.cpp.

179 {
180 /** @todo
181 * My approach was to utilize ::Both especially for single
182 * tooth and manual kikstarter, to be ready on both sides of blind.
183 * But unfortuneally, my experiments show me the Trigger can't
184 * become syncronized by 'last' and folowed 'first' events only.
185 * Also I observe phase-aligment mehanism is trying to consume a
186 * longer side of trigger as latest before TDC.
187 * I wish to setup SyncEdge::Both for my TT_60DEG_TOOTH after
188 * this case of scenario become work well. For now, ::Rise work
189 * well for my 60 degree trigger and both edges phase sync work
190 * as mush as expected for my engine startup. */
191
193
196
197 s->tdcPosition = 60;
198
199 s->isSynchronizationNeeded = false;
200 s->useOnlyPrimaryForSync = true;
201}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void addEvent360(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_CRANK_SENSOR

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureArcticCat()

void configureArcticCat ( TriggerWaveform s)

Definition at line 203 of file trigger_misc.cpp.

203 {
205
206 int totalTeethCount = 24;
207 float engineCycle = TWO_STROKE_CYCLE_DURATION;
208 float toothWidth = 0.5;
209
210 addSkippedToothTriggerEvents(TriggerWheel::T_PRIMARY, s, totalTeethCount, 0, toothWidth, /*offset*/0, engineCycle,
211 /*from*/ 30 + 1, /* to */ 195 + 1);
212
213
214 addSkippedToothTriggerEvents(TriggerWheel::T_PRIMARY, s, totalTeethCount, 0, toothWidth, /*offset*/0, engineCycle,
215 /*from*/ 210 + 1, /* to */ NO_RIGHT_FILTER);
216
218 int c = 9;
219 for (int gapIndex = 1; gapIndex <= c; gapIndex++) {
220 s->setTriggerSynchronizationGap3(gapIndex, 0.75, 1.25);
221 }
222
223
224}
void setTriggerSynchronizationGap(float syncRatio)
void setTriggerSynchronizationGap3(int index, float syncRatioFrom, float syncRatioTo)
@ TWO_STROKE
void addSkippedToothTriggerEvents(TriggerWheel wheel, TriggerWaveform *s, int totalTeethCount, int skippedCount, float toothWidthPercentage, float offset, float engineCycle, float filterLeft, float filterRight)

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureBarra3plus1cam()

void configureBarra3plus1cam ( TriggerWaveform s)

Definition at line 129 of file trigger_misc.cpp.

129 {
131
132 // This wheel has four teeth
133 // two short gaps, and two long gaps
134 // short = 60 deg
135 // long = 120 deg
136
137 {
138 int offset = 60;
139 int w = 5;
140
142
143 // short gap 60 deg
144 s->addToothRiseFall(offset + 60, w);
145
146 // long gap 120 deg
147 s->addToothRiseFall(offset + 180, w);
148 // long gap 120 deg
149 s->addToothRiseFall(offset + 300, w);
150
151 // short gap, 60 deg back to zero/720
152 }
153
154 // sync tooth is the zero tooth, the first short gap after two long gaps
155 s->setTriggerSynchronizationGap3(0, 1.6f, 2.4f);
156 // previous gap should be 1.0
157 s->setTriggerSynchronizationGap3(1, 0.8f, 1.2f);
158}
void addToothRiseFall(angle_t angle, angle_t width=10, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_CAM_SENSOR
uint16_t offset
Definition tunerstudio.h:0

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureBenelli()

void configureBenelli ( TriggerWaveform s)

Definition at line 160 of file trigger_misc.cpp.

160 {
162
163 constexpr float magic = 15;
164
165 float angle = 3 * magic;
166
167 s->addEvent360(angle / 2 /* 22.5 */, TriggerValue::RISE);
168 s->addEvent360(angle /* 45 */, TriggerValue::FALL);
169
170 for (int i = 0;i< 24 - 3;i++) {
171 angle += magic / 2;
173
174 angle += magic / 2;
176 }
177}

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureDaihatsu3cyl()

void configureDaihatsu3cyl ( TriggerWaveform s)

Definition at line 118 of file trigger_misc.cpp.

118 {
119 daihatsu(s, 3);
121}
static void daihatsu(TriggerWaveform *s, int count)

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureDaihatsu4cyl()

void configureDaihatsu4cyl ( TriggerWaveform s)

Definition at line 124 of file trigger_misc.cpp.

124 {
125 daihatsu(s, 4);
127}

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureFiatIAQ_P8()

void configureFiatIAQ_P8 ( TriggerWaveform s)

Definition at line 14 of file trigger_misc.cpp.

14 {
16
17 int width = 60;
18 s->tdcPosition = width;
19
22
23 s->addEvent720(180 + width, TriggerValue::RISE);
26}
void addEvent720(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureFordPip()

void configureFordPip ( TriggerWaveform s)

based on https://fordsix.com/threads/understanding-standard-and-signature-pip-thick-film-ignition.81515/ based on https://www.w8ji.com/distributor_stabbing.htm

sensor is mounted on distributor but trigger shape is defined in engine cycle angles

Definition at line 58 of file trigger_misc.cpp.

58 {
60
61 s->tdcPosition = 662.5;
62
65 /**
66 * sensor is mounted on distributor but trigger shape is defined in engine cycle angles
67 */
68 int oneCylinder = s->getCycleDuration() / 8;
69
70 s->addEventAngle(oneCylinder * 0.75, TriggerValue::RISE);
71 s->addEventAngle(oneCylinder, TriggerValue::FALL);
72
73
74 for (int i = 2;i<=8;i++) {
75 s->addEventAngle(oneCylinder * (i - 0.5), TriggerValue::RISE);
76 s->addEventAngle(oneCylinder * i, TriggerValue::FALL);
77 }
78
79}
void setSecondTriggerSynchronizationGap(float syncRatio)
angle_t getCycleDuration() const
void addEventAngle(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureFordST170()

void configureFordST170 ( TriggerWaveform s)

Definition at line 81 of file trigger_misc.cpp.

81 {
83 int width = 10;
84
85 int total = s->getCycleDuration() / 8;
86
87 s->addEventAngle(1 * total - width, TriggerValue::RISE);
88 s->addEventAngle(1 * total, TriggerValue::FALL);
89
90 s->addEventAngle(2 * total - width, TriggerValue::RISE);
91 s->addEventAngle(2 * total, TriggerValue::FALL);
92
93 s->addEventAngle(4 * total - width, TriggerValue::RISE);
94 s->addEventAngle(4 * total, TriggerValue::FALL);
95
96 s->addEventAngle(6 * total - width, TriggerValue::RISE);
97 s->addEventAngle(6 * total, TriggerValue::FALL);
98
99 s->addEventAngle(8 * total - width, TriggerValue::RISE);
100 s->addEventAngle(8 * total, TriggerValue::FALL);
101}

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configureTriTach()

void configureTriTach ( TriggerWaveform s)

Definition at line 29 of file trigger_misc.cpp.

29 {
31
32 s->isSynchronizationNeeded = false;
33
34 float toothWidth = 0.5;
35
36 float engineCycle = FOUR_STROKE_ENGINE_CYCLE;
37
38 int totalTeethCount = 135;
39 float offset = 0;
40
41 float angleDown = engineCycle / totalTeethCount * (0 + (1 - toothWidth));
42 float angleUp = engineCycle / totalTeethCount * (0 + 1);
43 s->addEventClamped(offset + angleDown, TriggerValue::RISE, TriggerWheel::T_PRIMARY, NO_LEFT_FILTER, NO_RIGHT_FILTER);
44 s->addEventClamped(offset + angleDown + 0.1, TriggerValue::RISE, TriggerWheel::T_SECONDARY, NO_LEFT_FILTER, NO_RIGHT_FILTER);
45 s->addEventClamped(offset + angleUp, TriggerValue::FALL, TriggerWheel::T_PRIMARY, NO_LEFT_FILTER, NO_RIGHT_FILTER);
46 s->addEventClamped(offset + angleUp + 0.1, TriggerValue::FALL, TriggerWheel::T_SECONDARY, NO_LEFT_FILTER, NO_RIGHT_FILTER);
47
48
49 addSkippedToothTriggerEvents(TriggerWheel::T_SECONDARY, s, totalTeethCount, /* skipped */ 0, toothWidth, offset, engineCycle,
50 1.0 * FOUR_STROKE_ENGINE_CYCLE / 135,
51 NO_RIGHT_FILTER);
52}
void addEventClamped(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex, float filterLeft, float filterRight)

Referenced by TriggerWaveform::initializeTriggerWaveform().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.