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

Detailed Description

https://en.wikipedia.org/wiki/Renix Has something to do with AMC/Jeep

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

Definition in file trigger_renix.cpp.

Functions

static void commonRenix (TriggerWaveform *s)
 
void initializeRenix44_2_2 (TriggerWaveform *s)
 
void initializeRenix66_2_2 (TriggerWaveform *s)
 
void JeepRenix66_2_2 (TriggerWaveform *s, size_t halfCylinderCount, size_t totalWheel, size_t missing)
 
void initializeJeepRenix66_2_2 (TriggerWaveform *s)
 

Function Documentation

◆ commonRenix()

static void commonRenix ( TriggerWaveform s)
static

Definition at line 15 of file trigger_renix.cpp.

15 {
16 // 44-2-2 is symmetrical so we only need to define one half
17 int count = 22;
18 float tooth = s->getCycleDuration() / count; // hint: tooth = 8.181818 degrees
19
20 float currentAngle = 0;
21 for (int i = 0;i < 20;i++) {
22 s->addEventAngle(currentAngle + tooth / 2, TriggerValue::RISE);
23 s->addEventAngle(currentAngle + tooth, TriggerValue::FALL);
24 currentAngle += tooth;
25 }
26
27 s->addEventAngle(currentAngle + tooth, TriggerValue::RISE);
28
29 // float math error accumulates at this point so we have to spell out 180
31}
angle_t getCycleDuration() const
void addEventAngle(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
uint16_t count
Definition tunerstudio.h:1

Referenced by initializeRenix44_2_2(), and initializeRenix66_2_2().

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

◆ initializeJeepRenix66_2_2()

void initializeJeepRenix66_2_2 ( TriggerWaveform s)

Definition at line 67 of file trigger_renix.cpp.

67 {
69
70 // 6 cylinder = 66 tooth wheel, missing 2 teeth in 3 spots
71 JeepRenix66_2_2(s, 3, 66, 2);
72 s->setTriggerSynchronizationGap3(/*gapIndex*/0, 0.2, 0.5);
73 s->setTriggerSynchronizationGap3(/*gapIndex*/1, 2, 4);
74 s->setTriggerSynchronizationGap3(/*gapIndex*/2, 0.6, 1.4);
75}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void setTriggerSynchronizationGap3(int index, float syncRatioFrom, float syncRatioTo)
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
void JeepRenix66_2_2(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:

◆ initializeRenix44_2_2()

void initializeRenix44_2_2 ( TriggerWaveform s)

Definition at line 34 of file trigger_renix.cpp.

34 {
36 commonRenix(s);
37}
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
static void commonRenix(TriggerWaveform *s)

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ initializeRenix66_2_2()

void initializeRenix66_2_2 ( TriggerWaveform s)

Definition at line 40 of file trigger_renix.cpp.

Referenced by TriggerWaveform::initializeTriggerWaveform().

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

◆ JeepRenix66_2_2()

void JeepRenix66_2_2 ( TriggerWaveform s,
size_t  halfCylinderCount,
size_t  totalWheel,
size_t  missing 
)

Definition at line 47 of file trigger_renix.cpp.

47 {
48
49 auto toothAngle = 360.0f / totalWheel;
50
51 auto patternTeeth = totalWheel / halfCylinderCount;
52 auto toothCount = patternTeeth - missing;
53
54 float currentAngle = missing * toothAngle;
55 for (size_t i = 0; i < toothCount; i++) {
56 currentAngle += toothAngle;
57 s->addEventAngle(currentAngle - (toothAngle/2), TriggerValue::RISE);
58 if (i==toothCount-1) { // last event at 120
60 } else {
61 s->addEventAngle(currentAngle, TriggerValue::FALL);
62 }
63 }
64}

Referenced by initializeJeepRenix66_2_2().

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

Go to the source code of this file.