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

Functions

void initialize60_2_2_Renault_F (TriggerWaveform *s)
 

Function Documentation

◆ initialize60_2_2_Renault_F()

void initialize60_2_2_Renault_F ( TriggerWaveform s)

Definition at line 6 of file trigger_renault.cpp.

6 {
8 int totalTeethCount = 60;
9
10 float engineCycle = FOUR_STROKE_ENGINE_CYCLE;
11 float toothWidth = 0.5;
12
13 float oneTooth = engineCycle / totalTeethCount;
14
15 int skipped = 3; // yes, from this perspective only three are skipped
16
17 // remaining 56 teeth while filtering four out
18 addSkippedToothTriggerEvents(TriggerWheel::T_PRIMARY, s, totalTeethCount, skipped, toothWidth, /*offset*/0, engineCycle,
19 NO_LEFT_FILTER, 719);
20
21#if EFI_UNIT_TEST
22 criticalAssertVoid(s->wave.phaseCount == (totalTeethCount - skipped) * 2 - 1, "Tooth count 60-3");
23#endif // EFI_UNIT_TEST
24
25 float specialPosition = 58 * oneTooth;
26
27 // single twice-the-width tooth
28 // we have that weird API where last FALL is added as 720, all while we do not really care about FALL fronts :(
29 addSkippedToothTriggerEvents(TriggerWheel::T_PRIMARY, s, totalTeethCount, 0, toothWidth, /*offset*/0, engineCycle,
30 specialPosition - 1, specialPosition - 1 + oneTooth);
31
32#if EFI_UNIT_TEST
33 criticalAssertVoid(s->wave.phaseCount == (totalTeethCount - skipped) * 2 + 1, "Tooth count 60-2-2");
34#endif // EFI_UNIT_TEST
35
37
41}
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void setSecondTriggerSynchronizationGap(float syncRatio)
void setTriggerSynchronizationGap(float syncRatio)
void setThirdTriggerSynchronizationGap(float syncRatio)
MultiChannelStateSequenceWithData< PWM_PHASE_MAX_COUNT > wave
void addEvent(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
@ FOUR_STROKE_CRANK_SENSOR
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:

Go to the source code of this file.