2021-06-25 21:51:09 -07:00
|
|
|
/*
|
|
|
|
* @file test_real_volkswagen.cpp
|
|
|
|
*
|
|
|
|
* @date Jun 26, 2021
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "engine_test_helper.h"
|
|
|
|
#include "logicdata_csv_reader.h"
|
|
|
|
|
|
|
|
TEST(crankingVW, vwRealCrankingFromFile) {
|
2021-07-01 14:29:31 -07:00
|
|
|
CsvReader reader(1);
|
2021-06-25 21:51:09 -07:00
|
|
|
int indeces[1] = {0};
|
|
|
|
|
2021-07-13 09:35:43 -07:00
|
|
|
reader.open("tests/trigger/resources/nick_1.csv", indeces);
|
2021-06-25 21:51:09 -07:00
|
|
|
WITH_ENGINE_TEST_HELPER (VW_ABA);
|
2021-06-26 13:05:43 -07:00
|
|
|
eth.setTriggerType(TT_60_2_VW PASS_ENGINE_PARAMETER_SUFFIX);
|
2021-06-25 21:51:09 -07:00
|
|
|
|
|
|
|
while (reader.haveMore()) {
|
|
|
|
reader.processLine(ð);
|
|
|
|
}
|
2021-06-25 22:37:55 -07:00
|
|
|
|
2021-06-27 10:01:56 -07:00
|
|
|
ASSERT_EQ( 0, eth.recentWarnings()->getCount())<< "warningCounter#vwRealCranking";
|
2021-07-01 14:29:31 -07:00
|
|
|
ASSERT_EQ( 1687, GET_RPM())<< reader.lineIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(crankingVW, crankingTwiceWithGap) {
|
|
|
|
WITH_ENGINE_TEST_HELPER (VW_ABA);
|
|
|
|
eth.setTriggerType(TT_60_2_VW PASS_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
|
|
|
|
{
|
|
|
|
CsvReader reader(1);
|
|
|
|
int indeces[1] = {0};
|
|
|
|
|
2021-07-13 09:35:43 -07:00
|
|
|
reader.open("tests/trigger/resources/nick_1.csv", indeces);
|
2021-07-01 14:29:31 -07:00
|
|
|
|
|
|
|
while (reader.haveMore()) {
|
|
|
|
reader.processLine(ð);
|
|
|
|
}
|
|
|
|
|
|
|
|
ASSERT_EQ(0, eth.recentWarnings()->getCount())<< "warningCounter#vwRealCranking";
|
|
|
|
ASSERT_EQ(1687, GET_RPM())<< reader.lineIndex();
|
|
|
|
}
|
2021-06-25 22:37:55 -07:00
|
|
|
|
2021-07-01 14:29:31 -07:00
|
|
|
auto now = getTimeNowNt();
|
|
|
|
|
|
|
|
{
|
|
|
|
// Offset by a short time offset, 10 seconds
|
|
|
|
CsvReader reader(1, 10);
|
|
|
|
int indeces[1] = {0};
|
|
|
|
|
2021-07-13 09:35:43 -07:00
|
|
|
reader.open("tests/trigger/resources/nick_1.csv", indeces);
|
2021-07-01 14:29:31 -07:00
|
|
|
|
|
|
|
while (reader.haveMore()) {
|
|
|
|
reader.processLine(ð);
|
|
|
|
}
|
|
|
|
|
|
|
|
ASSERT_EQ(0, eth.recentWarnings()->getCount());
|
|
|
|
ASSERT_EQ(1687, GET_RPM())<< reader.lineIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
// Offset by long time offset, 5m14.15s
|
|
|
|
CsvReader reader(1, 314.159);
|
|
|
|
int indeces[1] = {0};
|
|
|
|
|
2021-07-13 09:35:43 -07:00
|
|
|
reader.open("tests/trigger/resources/nick_1.csv", indeces);
|
2021-07-01 14:29:31 -07:00
|
|
|
|
|
|
|
while (reader.haveMore()) {
|
|
|
|
reader.processLine(ð);
|
|
|
|
}
|
|
|
|
|
|
|
|
ASSERT_EQ(0, eth.recentWarnings()->getCount());
|
|
|
|
ASSERT_EQ(1688, GET_RPM())<< reader.lineIndex();
|
|
|
|
}
|
2021-06-25 21:51:09 -07:00
|
|
|
}
|