rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
trigger
decoders
trigger_rover.cpp
Go to the documentation of this file.
1
/*
2
* @file trigger_rover.cpp
3
*
4
* @date Dec 27, 2015
5
* @author PhilTheGeek
6
* @author Andrey Belomutskiy, (c) 2012-2020
7
*/
8
9
#include "
pch.h
"
10
11
#include "
trigger_rover.h
"
12
13
/**
14
* https://en.wikipedia.org/wiki/Rover_K-series_engine
15
*/
16
void
initializeRoverK
(
TriggerWaveform
*s) {
17
s->
initialize
(
FOUR_STROKE_CRANK_SENSOR
,
SyncEdge::RiseOnly
);
18
19
float
tooth = 20;
20
21
s->
setTriggerSynchronizationGap
(2.0);
22
// wow that's odd
23
s->
setSecondTriggerSynchronizationGap2
(0.0001, 100000);
24
s->
setThirdTriggerSynchronizationGap
(2);
25
26
float
base = 0;
27
28
for
(
int
i = 0; i < 2; i++) {
29
s->
addEvent720
(base + tooth / 2,
TriggerValue::RISE
);
30
s->
addEvent720
(base + tooth,
TriggerValue::FALL
);
31
base += tooth;
32
}
33
base += tooth;
34
for
(
int
i = 0; i < 2; i++) {
35
s->
addEvent720
(base + tooth / 2,
TriggerValue::RISE
);
36
s->
addEvent720
(base + tooth,
TriggerValue::FALL
);
37
base += tooth;
38
}
39
base += tooth;
40
for
(
int
i = 0; i < 14; i++) {
41
s->
addEvent720
(base + tooth / 2,
TriggerValue::RISE
);
42
s->
addEvent720
(base + tooth,
TriggerValue::FALL
);
43
base += tooth;
44
}
45
base += tooth;
46
for
(
int
i = 0; i < 3; i++) {
47
s->
addEvent720
(base + tooth / 2,
TriggerValue::RISE
);
48
s->
addEvent720
(base + tooth,
TriggerValue::FALL
);
49
base += tooth;
50
}
51
base += tooth;
52
for
(
int
i = 0; i < 11; i++) {
53
s->
addEvent720
(base + tooth / 2,
TriggerValue::RISE
);
54
s->
addEvent720
(base + tooth,
TriggerValue::FALL
);
55
base += tooth;
56
}
57
58
}
TriggerWaveform
Trigger shape has all the fields needed to describe and decode trigger signal.
Definition
trigger_structure.h:47
TriggerWaveform::initialize
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
Definition
trigger_structure.cpp:65
TriggerWaveform::setTriggerSynchronizationGap
void setTriggerSynchronizationGap(float syncRatio)
Definition
trigger_structure.cpp:423
TriggerWaveform::addEvent720
void addEvent720(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
Definition
trigger_structure.cpp:246
TriggerWaveform::setSecondTriggerSynchronizationGap2
void setSecondTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)
Definition
trigger_structure.cpp:431
TriggerWaveform::setThirdTriggerSynchronizationGap
void setThirdTriggerSynchronizationGap(float syncRatio)
Definition
trigger_structure.cpp:435
pch.h
FOUR_STROKE_CRANK_SENSOR
@ FOUR_STROKE_CRANK_SENSOR
Definition
rusefi_enums.h:271
TriggerValue::RISE
@ RISE
TriggerValue::FALL
@ FALL
SyncEdge::RiseOnly
@ RiseOnly
initializeRoverK
void initializeRoverK(TriggerWaveform *s)
Definition
trigger_rover.cpp:16
trigger_rover.h
Generated on Fri Sep 26 2025 00:10:15 for rusEFI by
1.9.8