rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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 */
18
19 float tooth = 20;
20
22 // wow that's odd
23 s->setSecondTriggerSynchronizationGap2(0.0001, 100000);
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}
Trigger shape has all the fields needed to describe and decode trigger signal.
void initialize(operation_mode_e operationMode, SyncEdge syncEdge)
void setTriggerSynchronizationGap(float syncRatio)
void addEvent720(angle_t angle, TriggerValue const state, TriggerWheel const channelIndex=TriggerWheel::T_PRIMARY)
void setSecondTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo)
void setThirdTriggerSynchronizationGap(float syncRatio)
@ FOUR_STROKE_CRANK_SENSOR
void initializeRoverK(TriggerWaveform *s)