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

Detailed Description

Date
Sep 19, 2015
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file trigger_nissan.h.

Functions

void initializeNissanSR20VE_4 (TriggerWaveform *s)
 
void initializeNissanVQvvt (TriggerWaveform *s)
 
void initializeNissanMRvvt (TriggerWaveform *s)
 
void initializeNissanVQ35crank (TriggerWaveform *s)
 
void initializeNissanMR18crank (TriggerWaveform *s)
 
void initializeNissanQR25crank (TriggerWaveform *s)
 
void initializeNissanVQ30cam (TriggerWaveform *s)
 
void initializeNissanHRcrank (TriggerWaveform *s)
 
void initializeNissanHRvvtIn (TriggerWaveform *s)
 

Function Documentation

◆ initializeNissanHRcrank()

void initializeNissanHRcrank ( TriggerWaveform s)

Definition at line 216 of file trigger_nissan.cpp.

216 {
217 initialize_one_of_36_2_2(s, 9, 21);
218
219 size_t count = 9;
220
221 s->tdcPosition = 155 + 360;
222
223 s->setTriggerSynchronizationGap3(/*gapIndex*/0, 1.7, 5);
224 for (size_t i = 1 ; i < count ; i++) {
225 s->setTriggerSynchronizationGap3(/*gapIndex*/i, 0.6, 1.5);
226 }
227 s->setTriggerSynchronizationGap3(/*gapIndex*/count, 0.1, 0.5);
228 }
void setTriggerSynchronizationGap3(int index, float syncRatioFrom, float syncRatioTo)
void initialize_one_of_36_2_2(TriggerWaveform *s, int firstCount, int secondCount)
uint16_t count
Definition tunerstudio.h:1

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeNissanHRvvtIn()

void initializeNissanHRvvtIn ( TriggerWaveform s)

Definition at line 231 of file trigger_nissan.cpp.

231 {
233
234
235 s->addToothRiseFall(120);
236 s->addToothRiseFall(120 + 22);
237 s->addToothRiseFall(240);
238 s->addToothRiseFall(360);
239
240 s->setTriggerSynchronizationGap3(/*gapIndex*/0, 0.1, 0.3);
241}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void addToothRiseFall(angle_t angle, angle_t width=10, 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:

◆ initializeNissanMR18crank()

void initializeNissanMR18crank ( TriggerWaveform s)

Definition at line 84 of file trigger_nissan.cpp.

84 {
86
87 s->tdcPosition = 80;
88
89 // 4 cylinder = 36 tooth wheel, missing 2 teeth in 2 spots
90 makeNissanPattern(s, 2, 36, 2);
92}
void setTriggerSynchronizationGap(float syncRatio)
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
void makeNissanPattern(TriggerWaveform *s, size_t halfCylinderCount, size_t totalWheel, size_t missing)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeNissanMRvvt()

void initializeNissanMRvvt ( TriggerWaveform s)

Definition at line 155 of file trigger_nissan.cpp.

155 {
157 s->tdcPosition = 0;
158
159 int x = 73;
160
161 // All "groups" start every 90 degrees of cam rotation
162 // The groups have 1, 3, 4, 2 teeth each (which is the firing order?)
163
164 // Teeth within a group are spaced 17 cam degrees apart
165 int toothSpacing = 17;
166
167 // "1"
168 addvq30tooth(s, x + 0); // <-- sync point here
169
170 // "3"
171 addvq30tooth(s, x + 90 + 0 * toothSpacing);
172 addvq30tooth(s, x + 90 + 1 * toothSpacing);
173 addvq30tooth(s, x + 90 + 2 * toothSpacing);
174
175 // "4"
176 addvq30tooth(s, x + 180 + 0 * toothSpacing);
177 addvq30tooth(s, x + 180 + 1 * toothSpacing);
178 addvq30tooth(s, x + 180 + 2 * toothSpacing);
179 addvq30tooth(s, x + 180 + 3 * toothSpacing);
180
181 // "2"
182 addvq30tooth(s, x + 270 + 0 * toothSpacing);
183 addvq30tooth(s, x + 270 + 1 * toothSpacing);
184
185 // nominal gap 4.31
187
188 // nominal gap 0.44
190}
void setSecondTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)
void setTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)
static void addvq30tooth(TriggerWaveform *s, float angle)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeNissanQR25crank()

void initializeNissanQR25crank ( TriggerWaveform s)

Definition at line 94 of file trigger_nissan.cpp.

94 {
98
99 s->tdcPosition = 585;
100
101 float currentAngle = 20;
102 for (int i = 0;i < 16;i++) {
103 currentAngle += 10;
104 s->addEventAngle(currentAngle - 5, TriggerValue::RISE);
105 s->addEventAngle(currentAngle, TriggerValue::FALL);
106 }
107}
void setSecondTriggerSynchronizationGap(float syncRatio)
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:

◆ initializeNissanSR20VE_4()

void initializeNissanSR20VE_4 ( TriggerWaveform s)

8,2,2,2 Nissan pattern

Definition at line 19 of file trigger_nissan.cpp.

19 {
21
22 s->tdcPosition = 630;
23
24 s->setTriggerSynchronizationGap2(9.67 * 0.75, 16);
25
26 float width = 4;
27
28 s->addEvent720(1 * 180 - 4 * width, TriggerValue::RISE);
30
31 s->addEvent720(2 * 180 - width, TriggerValue::RISE);
33
34 s->addEvent720(3 * 180 - width, TriggerValue::RISE);
36
37 s->addEvent720(4 * 180 - width, TriggerValue::RISE);
39}
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:

◆ initializeNissanVQ30cam()

void initializeNissanVQ30cam ( TriggerWaveform s)

Definition at line 116 of file trigger_nissan.cpp.

116 {
118
119 s->tdcPosition = 120;
120
121 int x = 360 + 52;
122
123 addvq30tooth(s, x - (360 - 9 * 0));
124 addvq30tooth(s, x - (360 - 9 * 1));
125 addvq30tooth(s, x - (360 - 9 * 2));
126
127 addvq30tooth(s, x - (252 + 9 * 5));
128 addvq30tooth(s, x - (252 + 9 * 4));
129 addvq30tooth(s, x - (252 + 9 * 3));
130 addvq30tooth(s, x - (252 + 9 * 2));
131 addvq30tooth(s, x - (252 + 9 * 1));
132 addvq30tooth(s, x - (252 + 9 * 0));
133
134 addvq30tooth(s, x - (236 ));
135
136 addvq30tooth(s, x - (152 + 9 * 3));
137 addvq30tooth(s, x - (152 + 9 * 2));
138 addvq30tooth(s, x - (152 + 9 * 1));
139 addvq30tooth(s, x - (152 + 9 * 0));
140
141 addvq30tooth(s, x - (85 + 9 * 4));
142 addvq30tooth(s, x - (85 + 9 * 3));
143 addvq30tooth(s, x - (85 + 9 * 2));
144 addvq30tooth(s, x - (85 + 9 * 1));
145 addvq30tooth(s, x - (85 + 9 * 0));
146
147 addvq30tooth(s, x - (52 + 9 * 1));
148 addvq30tooth(s, x - (52 + 9 * 0));
149
150 s->setTriggerSynchronizationGap4(/*gapIndex*/0, 5.78);
151 s->setTriggerSynchronizationGap4(/*gapIndex*/1, 0.38);
152 s->setTriggerSynchronizationGap4(/*gapIndex*/2, 2.67);
153}
void setTriggerSynchronizationGap4(int index, float syncRatio)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeNissanVQ35crank()

void initializeNissanVQ35crank ( TriggerWaveform s)

Definition at line 72 of file trigger_nissan.cpp.

72 {
74
75 s->tdcPosition = 675;
76
77 // 6 cylinder = 36 tooth wheel, missing 2 teeth in 3 spots
78 makeNissanPattern(s, 3, 36, 2);
79 s->setTriggerSynchronizationGap3(/*gapIndex*/0, 0.2, 0.5);
80 s->setTriggerSynchronizationGap3(/*gapIndex*/1, 2, 4);
81 s->setTriggerSynchronizationGap3(/*gapIndex*/2, 0.6, 1.4);
82}
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeNissanVQvvt()

void initializeNissanVQvvt ( TriggerWaveform s)

Definition at line 41 of file trigger_nissan.cpp.

41 {
43
44 int offset = 360 - 260;
45
46 s->addToothRiseFall(offset + 20);
47 s->addToothRiseFall(offset + 80);
48 s->addToothRiseFall(offset + 100);
49 s->addToothRiseFall(offset + 140);
50 s->addToothRiseFall(offset + 160);
51 s->addToothRiseFall(offset + 260);
52
55}
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:

Go to the source code of this file.