rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
trigger_gm.cpp File Reference

Detailed Description

Date
Mar 28, 2014
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file trigger_gm.cpp.

Functions

static float addTooth (float offset, TriggerWaveform *s)
 
void configureGm60_2_2_2 (TriggerWaveform *s)
 
void configureGmTriggerWaveform (TriggerWaveform *s)
 
static int gm_tooth_pair (float startAngle, bool isShortLong, TriggerWaveform *s, float shortToothWidth)
 
static void initGmLS24 (TriggerWaveform *s, float shortToothWidth)
 
void initGmLS24_5deg (TriggerWaveform *s)
 
void initGmLS24_3deg (TriggerWaveform *s)
 

Function Documentation

◆ addTooth()

static float addTooth ( float  offset,
TriggerWaveform s 
)
static

Definition at line 14 of file trigger_gm.cpp.

14 {
15 s->addToothRiseFall(offset + GM_60_W / 2, GM_60_W / 2, TriggerWheel::T_SECONDARY);
16 return offset + GM_60_W;
17}
void addToothRiseFall(angle_t angle, angle_t width=10, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
uint16_t offset
Definition tunerstudio.h:0

Referenced by configureGm60_2_2_2().

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

◆ configureGm60_2_2_2()

void configureGm60_2_2_2 ( TriggerWaveform s)

https://github.com/rusefi/rusefi/issues/2264 GM/Daewoo Distributor on the F8CV

Definition at line 23 of file trigger_gm.cpp.

23 {
25 s->isSynchronizationNeeded = false;
26 s->isSecondWheelCam = true;
27
28 int offset = 1;
29
30 for (int i=0;i<12;i++) {
32 }
33
34 offset += 2 * GM_60_W;
35
36 for (int i=0;i<18;i++) {
38 }
39
40 offset += 2 * GM_60_W;
41
42 for (int i=0;i<18;i++) {
44 }
45
46 offset += 2 * GM_60_W;
47
48 for (int i=0;i<5;i++) {
50 }
51
52 s->addEvent360(360 - GM_60_W, TriggerValue::RISE);
53
55
57
58}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void addEvent360(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_CAM_SENSOR
static float addTooth(float offset, TriggerWaveform *s)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ configureGmTriggerWaveform()

void configureGmTriggerWaveform ( TriggerWaveform s)

Definition at line 60 of file trigger_gm.cpp.

60 {
62
63 float w = 5;
64
65 s->addToothRiseFall(60, w);
66
67 s->addToothRiseFall(120, w);
68
69 s->addToothRiseFall(180, w);
70
71 s->addToothRiseFall(240, w);
72
73 s->addToothRiseFall(300, w);
74
75 s->addToothRiseFall(350, w);
76
77 s->addToothRiseFall(360, w);
78
80}
void setTriggerSynchronizationGap(float syncRatio)
@ FOUR_STROKE_CRANK_SENSOR

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ gm_tooth_pair()

static int gm_tooth_pair ( float  startAngle,
bool  isShortLong,
TriggerWaveform s,
float  shortToothWidth 
)
static

Definition at line 82 of file trigger_gm.cpp.

83{
84 int window = (isShortLong ? shortToothWidth : (15 - shortToothWidth));
85 int end = startAngle + 15;
86
87 s->addEvent360(startAngle + window, TriggerValue::RISE);
89
90 return end;
91}

Referenced by initGmLS24().

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

◆ initGmLS24()

static void initGmLS24 ( TriggerWaveform s,
float  shortToothWidth 
)
static

TT_GM_24x_5 and TT_GM_24x_3 https://www.mediafire.com/?40mfgeoe4ctti http://www.ls1gto.com/forums/archive/index.php/t-190549.htm http://www.ls2.com/forums/showthread.php/834483-LS-Timing-Reluctor-Wheels-Explained

based on data in https://rusefi.com/forum/viewtopic.php?f=3&t=936&p=30303#p30285

Definition at line 102 of file trigger_gm.cpp.

102 {
104
105 /*
106 * Okay, here's how this magic works:
107 * The GM 24x crank wheel has 48 edges. There is
108 * a falling edge every 15 degrees (1/24 revolution).
109 * After every falling edge, a rising edge occurs either
110 * 5 or 10 (= 15 - 5) degrees later. The code 0x0A33BE
111 * encodes the pattern of which type of gap occurs in the
112 * pattern. Starting from the LSB, each bit left is the
113 * next gap in sequence as the crank turns. A 0 indicates
114 * long-short (late rising edge), while a 1 indicates
115 * short-long (early rising edge).
116 *
117 * The first few bits read are 0xE (LSB first!) = 0 - 1 - 1 - 1, so the pattern
118 * looks like this:
119 * ___ _ ___ ___ _
120 * |___| |_| |_| |___| |_ etc
121 *
122 * | 0 | 1 | 1 | 0 |
123 *
124 * ___ = 10 degrees, _ = 5 deg
125 *
126 * There is a falling edge at angle=0=720, and this is position
127 * is #1 (and #6) TDC. If there's a falling edge on the cam
128 * sensor, it's #1 end compression stroke (fire this plug!)
129 * and #6 end exhaust stroke. If rising, it's exhaust #1,
130 * compression #6.
131 */
132
133 uint32_t code = 0x0A33BE;
134
135 int angle = 0;
136
137 for(int i = 0; i < 24; i++)
138 {
139 bool bit = code & 0x000001;
140 code = code >> 1;
141
142 angle = gm_tooth_pair(angle, bit, s, shortToothWidth);
143 }
144}
uint8_t code
Definition bluetooth.cpp:40
static int gm_tooth_pair(float startAngle, bool isShortLong, TriggerWaveform *s, float shortToothWidth)

Referenced by initGmLS24_3deg(), and initGmLS24_5deg().

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

◆ initGmLS24_3deg()

void initGmLS24_3deg ( TriggerWaveform s)

Definition at line 159 of file trigger_gm.cpp.

159 {
160 initGmLS24(s, 3);
161
162 // This is tooth #20, at 312 degrees ATDC #1
166
167 s->tdcPosition = 48;
168}
void setSecondTriggerSynchronizationGap(float syncRatio)
void setThirdTriggerSynchronizationGap(float syncRatio)
static void initGmLS24(TriggerWaveform *s, float shortToothWidth)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initGmLS24_5deg()

void initGmLS24_5deg ( TriggerWaveform s)

Definition at line 147 of file trigger_gm.cpp.

147 {
148 initGmLS24(s, 5);
149
150 // This is tooth #20, at 310 degrees ATDC #1
154
155 s->tdcPosition = 50;
156}

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.