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

Detailed Description

Date
Feb 18, 2014
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file trigger_mazda.h.

Functions

void initializeMazdaMiataNaShape (TriggerWaveform *s)
 
void initializeMazdaMiataNb2Crank (TriggerWaveform *s)
 
void initializeMazdaMiataVVtTestShape (TriggerWaveform *s)
 
void configureMazdaProtegeSOHC (TriggerWaveform *s)
 
void configureMazdaProtegeLx (TriggerWaveform *s)
 
void initializeMazdaMiataVVtCamShape (TriggerWaveform *s)
 
void initializeMazdaSkyactivCam (TriggerWaveform *s)
 
void initializeMazdaLCam (TriggerWaveform *s)
 

Function Documentation

◆ configureMazdaProtegeLx()

void configureMazdaProtegeLx ( TriggerWaveform s)

based on https://svn.code.sf.net/p/rusefi/code/trunk/misc/logs/1993_escort_gt/MAIN_rfi_report_2015-02-01%2017_39.csv

Definition at line 138 of file trigger_mazda.cpp.

138 {
140 s->isSecondWheelCam = true;
141 /**
142 * based on https://svn.code.sf.net/p/rusefi/code/trunk/misc/logs/1993_escort_gt/MAIN_rfi_report_2015-02-01%2017_39.csv
143 */
145
146 s->addEvent720(95.329254 + 14.876692, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
148
149 s->addEvent720(95.329254 + 137.119154, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
150
151 s->addEvent720(95.329254 + 192.378308, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
153
154 s->addEvent720(95.329254 + 373.060597, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
156
159
160 s->tdcPosition = 137.119154;
161 s->isSynchronizationNeeded = false;
162}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void addEvent720(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_CAM_SENSOR

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ configureMazdaProtegeSOHC()

void configureMazdaProtegeSOHC ( TriggerWaveform s)

Definition at line 120 of file trigger_mazda.cpp.

120 {
122
123 float z = 0.093;
124 float a = 90;
125 s->addToothRiseFall(a, z * 360);
126
127 a += 90;
128 s->addToothRiseFall(a, z * 360);
129 a += 90;
130 s->addToothRiseFall(a, z * 360);
131 a += 90;
132 s->addToothRiseFall(a, z * 360);
133
134 s->isSynchronizationNeeded = false;
135 s->shapeWithoutTdc = true;
136}
void addToothRiseFall(angle_t angle, angle_t width=10, 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:

◆ initializeMazdaLCam()

void initializeMazdaLCam ( TriggerWaveform s)

Definition at line 204 of file trigger_mazda.cpp.

204 {
206
207 // 6 teeth:
208 // 0, 60, 90, 150, 180, 270
209 // Tooth at 0 is just before #1 TDC
210
211 // 60
214
215 // 90
218
219 // 150
222
223 // 180
226
227 // 270
230
231 // 0 (aka 360)
234
235 s->setTriggerSynchronizationGap3(0, 0.32, 0.8);
236 s->setTriggerSynchronizationGap3(1, 1.5, 2.5);
237 s->setTriggerSynchronizationGap3(2, 0.32, 0.8);
238}
void addEvent360(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
void setTriggerSynchronizationGap3(int index, float syncRatioFrom, float syncRatioTo)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeMazdaMiataNaShape()

void initializeMazdaMiataNaShape ( TriggerWaveform s)

http://rusefi.com/forum/viewtopic.php?f=3&t=729&p=12983#p12983

Definition at line 27 of file trigger_mazda.cpp.

27 {
29 s->isSecondWheelCam = true;
30
31 // nominal gap is 0.325
33 // nominal gap is ~1.52
35
36 s->tdcPosition = 5.181;
37
38 /**
39 * http://rusefi.com/forum/viewtopic.php?f=3&t=729&p=12983#p12983
40 */
43
46 s->addEvent720(288.819688, TriggerValue::FALL, TriggerWheel::T_PRIMARY); // <-- This edge is the sync point
48
51
56 s->useOnlyPrimaryForSync = true;
57}
void setSecondTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)
void setTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeMazdaMiataNb2Crank()

void initializeMazdaMiataNb2Crank ( TriggerWaveform s)

Note how we use 0..180 range while defining FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR trigger Note that only half of the physical wheel is defined here!

Definition at line 60 of file trigger_mazda.cpp.

60 {
61 /**
62 * Note how we use 0..180 range while defining FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR trigger
63 * Note that only half of the physical wheel is defined here!
64 */
66
67 s->tdcPosition = 60 + 655;
68
69 // Nominal gap 70/110 = 0.636
70 s->setTriggerSynchronizationGap2(0.35f, 1.15f);
71 // Nominal gap 110/70 = 1.571
73
74 // todo: NB2 fronts are inverted comparing to NB1, life is not perfect :(
75 s->addEventAngle(180.0f - NB_CRANK_MAGIC - 4, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
76 s->addEventAngle(180.0f - NB_CRANK_MAGIC, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
79}
void addEventAngle(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeMazdaMiataVVtCamShape()

void initializeMazdaMiataVVtCamShape ( TriggerWaveform s)

TT_VVT_MIATA_NB2 if you unplug crank sensor you can start & run your engine on just this cam decoder trigger offset "-90" seems to be doing the job

same decoder is used for VVT processing

Definition at line 164 of file trigger_mazda.cpp.

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeMazdaMiataVVtTestShape()

void initializeMazdaMiataVVtTestShape ( TriggerWaveform s)

Definition at line 116 of file trigger_mazda.cpp.

116 {
118}
static void initializeMazdaMiataNb1ShapeWithOffset(TriggerWaveform *s, float offset)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeMazdaSkyactivCam()

void initializeMazdaSkyactivCam ( TriggerWaveform s)

Definition at line 184 of file trigger_mazda.cpp.

184 {
186
187 int wide = 20;
188 int narrow = 10;
189
190 s->addToothRiseFall(70, wide);
191 s->addToothRiseFall(90, narrow);
192
193 s->addToothRiseFall(160, wide);
194 s->addToothRiseFall(180, narrow);
195
196 s->addToothRiseFall(270, wide);
197 s->addToothRiseFall(360, wide);
198
201 s->setThirdTriggerSynchronizationGap(1.12); // 3rd gap is not required but let's have it for some resiliency
202}
void setSecondTriggerSynchronizationGap(float syncRatio)
void setTriggerSynchronizationGap(float syncRatio)
void setThirdTriggerSynchronizationGap(float syncRatio)

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.