Honda K 12+1 decoder adjustment (#3694)
* adjust trigger * real cranking * mk
This commit is contained in:
parent
adc93eb51b
commit
256df56fa7
|
@ -253,22 +253,29 @@ void configureOnePlus16(TriggerWaveform *s) {
|
|||
s->isSynchronizationNeeded = false;
|
||||
}
|
||||
|
||||
static void kseriesTooth(TriggerWaveform* s, float end) {
|
||||
// for VR we only handle rises so width does not matter much
|
||||
s->addEvent360(end - 4, T_PRIMARY, TV_RISE);
|
||||
s->addEvent360(end , T_PRIMARY, TV_FALL);
|
||||
}
|
||||
|
||||
// TT_HONDA_K_12_1
|
||||
void configureHondaK_12_1(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CRANK_SENSOR);
|
||||
|
||||
s->setTriggerSynchronizationGap(3);
|
||||
// nominal gap 0.33
|
||||
s->setSecondTriggerSynchronizationGap2(0.2f, 0.5f);
|
||||
// nominal gap 2.0
|
||||
s->setTriggerSynchronizationGap2(1.6f, 2.4f);
|
||||
|
||||
int count = 12;
|
||||
float tooth = s->getCycleDuration() / count; // hint: tooth = 30
|
||||
float width = 4; // for VR we only handle rises so width does not matter much
|
||||
float tooth = 360 / count; // hint: tooth = 30
|
||||
|
||||
s->addEventAngle(20 - width, T_PRIMARY, TV_RISE);
|
||||
s->addEventAngle(20, T_PRIMARY, TV_FALL);
|
||||
// Extra "+1" tooth happens 1/3 of the way between first two teeth
|
||||
kseriesTooth(s, tooth / 3);
|
||||
|
||||
for (int i = 1; i <= count; i++) {
|
||||
s->addEventAngle(tooth * i - width, T_PRIMARY, TV_RISE);
|
||||
s->addEventAngle(tooth * i, T_PRIMARY, TV_FALL);
|
||||
kseriesTooth(s, tooth * i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ TESTS_SRC_CPP = \
|
|||
tests/trigger/test_real_volkswagen.cpp \
|
||||
tests/trigger/test_real_nb2_cranking.cpp \
|
||||
tests/trigger/test_real_gm_24x.cpp \
|
||||
tests/trigger/test_real_k24a2.cpp \
|
||||
tests/trigger/test_map_cam.cpp \
|
||||
tests/trigger/test_rpm_multiplier.cpp \
|
||||
tests/trigger/test_quad_cam.cpp \
|
||||
|
|
|
@ -0,0 +1,251 @@
|
|||
time, crank
|
||||
55.880562, 1
|
||||
55.894715, 0
|
||||
55.92862, 1
|
||||
55.93978, 0
|
||||
55.967227, 1
|
||||
55.977273, 0
|
||||
56.002086, 1
|
||||
56.011645, 0
|
||||
56.035074, 1
|
||||
56.04431, 0
|
||||
56.06672, 1
|
||||
56.07569, 0
|
||||
56.097082, 1
|
||||
56.105754, 0
|
||||
56.12635, 1
|
||||
56.134863, 0
|
||||
56.15483, 1
|
||||
56.160254, 0
|
||||
56.164395, 1
|
||||
56.171707, 0
|
||||
56.183027, 1
|
||||
56.191016, 0
|
||||
56.21092, 1
|
||||
56.219316, 0
|
||||
56.23883, 1
|
||||
56.247164, 0
|
||||
56.26631, 1
|
||||
56.27453, 0
|
||||
56.29334, 1
|
||||
56.301445, 0
|
||||
56.32006, 1
|
||||
56.32804, 0
|
||||
56.346668, 1
|
||||
56.354676, 0
|
||||
56.373434, 1
|
||||
56.381477, 0
|
||||
56.400293, 1
|
||||
56.40835, 0
|
||||
56.427023, 1
|
||||
56.435008, 0
|
||||
56.45343, 1
|
||||
56.461418, 0
|
||||
56.479637, 1
|
||||
56.4847, 0
|
||||
56.48856, 1
|
||||
56.495496, 0
|
||||
56.50603, 1
|
||||
56.513652, 0
|
||||
56.532445, 1
|
||||
56.540547, 0
|
||||
56.55914, 1
|
||||
56.567227, 0
|
||||
56.58568, 1
|
||||
56.59369, 0
|
||||
56.611973, 1
|
||||
56.619938, 0
|
||||
56.63812, 1
|
||||
56.64601, 0
|
||||
56.664305, 1
|
||||
56.67224, 0
|
||||
56.69071, 1
|
||||
56.698688, 0
|
||||
56.71726, 1
|
||||
56.72527, 0
|
||||
56.743742, 1
|
||||
56.751695, 0
|
||||
56.77003, 1
|
||||
56.777996, 0
|
||||
56.79618, 1
|
||||
56.801215, 0
|
||||
56.805055, 1
|
||||
56.811996, 0
|
||||
56.82252, 1
|
||||
56.830113, 0
|
||||
56.8489, 1
|
||||
56.85697, 0
|
||||
56.87554, 1
|
||||
56.883617, 0
|
||||
56.902027, 1
|
||||
56.910027, 0
|
||||
56.92827, 1
|
||||
56.93623, 0
|
||||
56.95437, 1
|
||||
56.96225, 0
|
||||
56.98053, 1
|
||||
56.988465, 0
|
||||
57.006973, 1
|
||||
57.014957, 0
|
||||
57.033586, 1
|
||||
57.041605, 0
|
||||
57.06014, 1
|
||||
57.068117, 0
|
||||
57.086492, 1
|
||||
57.094473, 0
|
||||
57.112688, 1
|
||||
57.117727, 0
|
||||
57.121574, 1
|
||||
57.128527, 0
|
||||
57.139047, 1
|
||||
57.146652, 0
|
||||
57.16546, 1
|
||||
57.17354, 0
|
||||
57.192164, 1
|
||||
57.200254, 0
|
||||
57.21877, 1
|
||||
57.226805, 0
|
||||
57.245207, 1
|
||||
57.253195, 0
|
||||
57.271508, 1
|
||||
57.279434, 0
|
||||
57.29786, 1
|
||||
57.305844, 0
|
||||
57.324477, 1
|
||||
57.332492, 0
|
||||
57.351234, 1
|
||||
57.359266, 0
|
||||
57.377906, 1
|
||||
57.385902, 0
|
||||
57.404355, 1
|
||||
57.41236, 0
|
||||
57.430656, 1
|
||||
57.435723, 0
|
||||
57.4396, 1
|
||||
57.44657, 0
|
||||
57.45715, 1
|
||||
57.46481, 0
|
||||
57.48368, 1
|
||||
57.491812, 0
|
||||
57.510504, 1
|
||||
57.518633, 0
|
||||
57.537168, 1
|
||||
57.54521, 0
|
||||
57.563605, 1
|
||||
57.571574, 0
|
||||
57.58988, 1
|
||||
57.597777, 0
|
||||
57.616156, 1
|
||||
57.62412, 0
|
||||
57.642695, 1
|
||||
57.6507, 0
|
||||
57.66941, 1
|
||||
57.677438, 0
|
||||
57.69608, 1
|
||||
57.704062, 0
|
||||
57.7225, 1
|
||||
57.7305, 0
|
||||
57.748777, 1
|
||||
57.75385, 0
|
||||
57.757723, 1
|
||||
57.764668, 0
|
||||
57.775242, 1
|
||||
57.782883, 0
|
||||
57.801727, 1
|
||||
57.80983, 0
|
||||
57.828484, 1
|
||||
57.836598, 0
|
||||
57.855086, 1
|
||||
57.86314, 0
|
||||
57.88147, 1
|
||||
57.88946, 0
|
||||
57.907734, 1
|
||||
57.915637, 0
|
||||
57.934016, 1
|
||||
57.941977, 0
|
||||
57.960555, 1
|
||||
57.968547, 0
|
||||
57.98721, 1
|
||||
57.995227, 0
|
||||
58.01378, 1
|
||||
58.021734, 0
|
||||
58.04014, 1
|
||||
58.048133, 0
|
||||
58.06636, 1
|
||||
58.071418, 0
|
||||
58.07528, 1
|
||||
58.082242, 0
|
||||
58.092805, 1
|
||||
58.10043, 0
|
||||
58.119297, 1
|
||||
58.127387, 0
|
||||
58.14608, 1
|
||||
58.154184, 0
|
||||
58.17271, 1
|
||||
58.180746, 0
|
||||
58.199074, 1
|
||||
58.207047, 0
|
||||
58.225277, 1
|
||||
58.23318, 0
|
||||
58.251484, 1
|
||||
58.259426, 0
|
||||
58.27796, 1
|
||||
58.285957, 0
|
||||
58.30461, 1
|
||||
58.31266, 0
|
||||
58.331207, 1
|
||||
58.339176, 0
|
||||
58.357625, 1
|
||||
58.365613, 0
|
||||
58.38389, 1
|
||||
58.38895, 0
|
||||
58.392805, 1
|
||||
58.39977, 0
|
||||
58.410336, 1
|
||||
58.41796, 0
|
||||
58.436793, 1
|
||||
58.44488, 0
|
||||
58.46353, 1
|
||||
58.47162, 0
|
||||
58.4901, 1
|
||||
58.498125, 0
|
||||
58.51648, 1
|
||||
58.524453, 0
|
||||
58.54273, 1
|
||||
58.550637, 0
|
||||
58.56901, 1
|
||||
58.576977, 0
|
||||
58.595566, 1
|
||||
58.603582, 0
|
||||
58.622293, 1
|
||||
58.630336, 0
|
||||
58.64892, 1
|
||||
58.656906, 0
|
||||
58.67534, 1
|
||||
58.683324, 0
|
||||
58.701598, 1
|
||||
58.706645, 0
|
||||
58.710504, 1
|
||||
58.71747, 0
|
||||
58.72804, 1
|
||||
58.735676, 0
|
||||
58.754508, 1
|
||||
58.762617, 0
|
||||
58.7813, 1
|
||||
58.789426, 0
|
||||
58.80797, 1
|
||||
58.816, 0
|
||||
58.834438, 1
|
||||
58.84242, 0
|
||||
58.860758, 1
|
||||
58.868676, 0
|
||||
58.887074, 1
|
||||
58.895035, 0
|
||||
58.91365, 1
|
||||
58.921656, 0
|
||||
58.940387, 1
|
||||
58.94842, 0
|
||||
58.967062, 1
|
||||
58.975047, 0
|
||||
58.99351, 1
|
||||
59.001523, 0
|
|
|
@ -0,0 +1,250 @@
|
|||
16.092467,0
|
||||
16.129099,1
|
||||
16.140876,0
|
||||
16.170595,1
|
||||
16.1812,0
|
||||
16.207619,1
|
||||
16.217553,0
|
||||
16.241685,1
|
||||
16.251077,0
|
||||
16.273669,1
|
||||
16.282752,0
|
||||
16.30429,1
|
||||
16.310149,0
|
||||
16.314592,1
|
||||
16.322242,0
|
||||
16.334342,1
|
||||
16.342746,0
|
||||
16.363893,1
|
||||
16.372639,0
|
||||
16.393271,1
|
||||
16.401918,0
|
||||
16.422074,1
|
||||
16.430586,0
|
||||
16.450299,1
|
||||
16.458668,0
|
||||
16.478137,1
|
||||
16.486387,0
|
||||
16.505818,1
|
||||
16.51409,0
|
||||
16.53363,1
|
||||
16.541914,0
|
||||
16.56152,1
|
||||
16.569807,0
|
||||
16.58923,1
|
||||
16.59743,0
|
||||
16.616627,1
|
||||
16.624816,0
|
||||
16.643756,1
|
||||
16.649004,0
|
||||
16.652982,1
|
||||
16.66009,0
|
||||
16.671053,1
|
||||
16.678889,0
|
||||
16.698408,1
|
||||
16.706723,0
|
||||
16.72606,1
|
||||
16.734361,0
|
||||
16.753527,1
|
||||
16.761756,0
|
||||
16.780754,1
|
||||
16.788928,0
|
||||
16.807816,1
|
||||
16.815912,0
|
||||
16.834887,1
|
||||
16.843025,0
|
||||
16.862182,1
|
||||
16.870371,0
|
||||
16.889646,1
|
||||
16.897854,0
|
||||
16.917012,1
|
||||
16.925146,0
|
||||
16.944205,1
|
||||
16.952367,0
|
||||
16.971277,1
|
||||
16.97649,0
|
||||
16.980459,1
|
||||
16.98759,0
|
||||
16.998557,1
|
||||
17.006371,0
|
||||
17.025857,1
|
||||
17.034146,0
|
||||
17.053393,1
|
||||
17.061652,0
|
||||
17.08073,1
|
||||
17.08892,0
|
||||
17.107777,1
|
||||
17.115904,0
|
||||
17.134643,1
|
||||
17.142701,0
|
||||
17.161531,1
|
||||
17.169627,0
|
||||
17.188646,1
|
||||
17.196781,0
|
||||
17.2159,1
|
||||
17.22407,0
|
||||
17.24307,1
|
||||
17.25117,0
|
||||
17.270018,1
|
||||
17.278139,0
|
||||
17.296816,1
|
||||
17.301984,0
|
||||
17.30593,1
|
||||
17.313002,0
|
||||
17.323791,1
|
||||
17.331555,0
|
||||
17.350818,1
|
||||
17.359066,0
|
||||
17.378125,1
|
||||
17.386375,0
|
||||
17.405322,1
|
||||
17.413479,0
|
||||
17.432305,1
|
||||
17.440406,0
|
||||
17.459078,1
|
||||
17.467117,0
|
||||
17.485883,1
|
||||
17.493953,0
|
||||
17.512928,1
|
||||
17.52104,0
|
||||
17.540127,1
|
||||
17.548277,0
|
||||
17.567234,1
|
||||
17.575326,0
|
||||
17.594143,1
|
||||
17.60226,0
|
||||
17.620906,1
|
||||
17.626072,0
|
||||
17.63002,1
|
||||
17.63707,0
|
||||
17.647848,1
|
||||
17.655613,0
|
||||
17.674854,1
|
||||
17.683096,0
|
||||
17.702148,1
|
||||
17.710389,0
|
||||
17.729258,1
|
||||
17.73742,0
|
||||
17.756193,1
|
||||
17.764277,0
|
||||
17.78292,1
|
||||
17.790938,0
|
||||
17.809691,1
|
||||
17.817764,0
|
||||
17.836738,1
|
||||
17.844863,0
|
||||
17.863994,1
|
||||
17.872143,0
|
||||
17.891188,1
|
||||
17.899275,0
|
||||
17.918115,1
|
||||
17.926223,0
|
||||
17.944855,1
|
||||
17.950025,0
|
||||
17.953965,1
|
||||
17.961,0
|
||||
17.971781,1
|
||||
17.979537,0
|
||||
17.998756,1
|
||||
18.00698,0
|
||||
18.026021,1
|
||||
18.034248,0
|
||||
18.053146,1
|
||||
18.061307,0
|
||||
18.08007,1
|
||||
18.088168,0
|
||||
18.106863,1
|
||||
18.114902,0
|
||||
18.133697,1
|
||||
18.141799,0
|
||||
18.16078,1
|
||||
18.168914,0
|
||||
18.188043,1
|
||||
18.196207,0
|
||||
18.21522,1
|
||||
18.223299,0
|
||||
18.24214,1
|
||||
18.250246,0
|
||||
18.2689,1
|
||||
18.274066,0
|
||||
18.277998,1
|
||||
18.285062,0
|
||||
18.29586,1
|
||||
18.303602,0
|
||||
18.322867,1
|
||||
18.331092,0
|
||||
18.350197,1
|
||||
18.358418,0
|
||||
18.377404,1
|
||||
18.385566,0
|
||||
18.404361,1
|
||||
18.41248,0
|
||||
18.431152,1
|
||||
18.43919,0
|
||||
18.457994,1
|
||||
18.466074,0
|
||||
18.4851,1
|
||||
18.493246,0
|
||||
18.512371,1
|
||||
18.520537,0
|
||||
18.539574,1
|
||||
18.547684,0
|
||||
18.566559,1
|
||||
18.574678,0
|
||||
18.593396,1
|
||||
18.598566,0
|
||||
18.602512,1
|
||||
18.609592,0
|
||||
18.620424,1
|
||||
18.628184,0
|
||||
18.647494,1
|
||||
18.65573,0
|
||||
18.674836,1
|
||||
18.683078,0
|
||||
18.702045,1
|
||||
18.710195,0
|
||||
18.729035,1
|
||||
18.737143,0
|
||||
18.755842,1
|
||||
18.763895,0
|
||||
18.782693,1
|
||||
18.790781,0
|
||||
18.809799,1
|
||||
18.817928,0
|
||||
18.837037,1
|
||||
18.845195,0
|
||||
18.864191,1
|
||||
18.872303,0
|
||||
18.891137,1
|
||||
18.899238,0
|
||||
18.917932,1
|
||||
18.9231,0
|
||||
18.927045,1
|
||||
18.934115,0
|
||||
18.944906,1
|
||||
18.952668,0
|
||||
18.971945,1
|
||||
18.980188,0
|
||||
18.999287,1
|
||||
19.007523,0
|
||||
19.026447,1
|
||||
19.034607,0
|
||||
19.05341,1
|
||||
19.061496,0
|
||||
19.080162,1
|
||||
19.088186,0
|
||||
19.106943,1
|
||||
19.115027,0
|
||||
19.133994,1
|
||||
19.142104,0
|
||||
19.161229,1
|
||||
19.169377,0
|
||||
19.18841,1
|
||||
19.196508,0
|
||||
19.21537,1
|
||||
19.223494,0
|
||||
19.242207,1
|
||||
19.247396,0
|
||||
19.251354,1
|
||||
19.258414,0
|
||||
19.26924,1
|
|
|
@ -0,0 +1,31 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "logicdata_csv_reader.h"
|
||||
|
||||
static void doTest(const char* testFile, int expectedRpm) {
|
||||
CsvReader reader(1, /* vvtCount */ 0);
|
||||
int indeces[1] = {0};
|
||||
|
||||
reader.open(testFile, indeces);
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
|
||||
eth.setTriggerType(TT_HONDA_K_12_1);
|
||||
|
||||
while (reader.haveMore()) {
|
||||
reader.processLine(ð);
|
||||
|
||||
engine->rpmCalculator.onSlowCallback();
|
||||
}
|
||||
|
||||
ASSERT_EQ(0, eth.recentWarnings()->getCount())<< "warningCounter#vwRealCranking";
|
||||
ASSERT_EQ(expectedRpm, GET_RPM())<< reader.lineIndex();
|
||||
}
|
||||
|
||||
TEST(realk24, crankingNoPlugs1) {
|
||||
doTest("tests/trigger/resources/cranking_honda_k24a2_no_plugs.csv", 189);
|
||||
}
|
||||
|
||||
TEST(realk24, crankingNoPlugs2) {
|
||||
doTest("tests/trigger/resources/cranking_honda_k24a2_no_plugs_2.csv", 185);
|
||||
}
|
Loading…
Reference in New Issue