[was: 3/0 trigger syncs faster with Single Tooth than 6G72 Cam] 6G72 Cam is not well #6798
only:this dataset is officially unhappy
This commit is contained in:
parent
3756316bbc
commit
f687d4ab7b
|
@ -2,9 +2,7 @@
|
|||
|
||||
#include "logicdata_csv_reader.h"
|
||||
|
||||
TEST(real6g72, data) {
|
||||
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
static void prepare(EngineTestHelper *eth, trigger_type_e trigger) {
|
||||
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
@ -12,31 +10,46 @@ TEST(real6g72, data) {
|
|||
|
||||
engineConfiguration->isPhaseSyncRequiredForIgnition = true;
|
||||
|
||||
eth.setTriggerType(trigger_type_e::TT_VVT_MITSU_6G72);
|
||||
eth->setTriggerType(trigger);
|
||||
|
||||
ASSERT_FALSE(engine->triggerCentral.triggerShape.shapeDefinitionError);
|
||||
|
||||
engineConfiguration->vvtMode[0] = VVT_INACTIVE;
|
||||
}
|
||||
|
||||
static void runTriggerTest(const char *fileName, int totalErrors, int syncCounter, float firstRpm) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
prepare(ð, trigger_type_e::TT_VVT_MITSU_6G72);
|
||||
|
||||
bool gotRpm = false;
|
||||
|
||||
CsvReader reader(/*trigger channels count*/1, /* vvtCount */ 0);
|
||||
reader.flipOnRead = true;
|
||||
|
||||
reader.open("tests/trigger/resources/3000gt.csv");
|
||||
reader.open(fileName);
|
||||
while (reader.haveMore()) {
|
||||
reader.processLine(ð);
|
||||
auto rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
printf("rpm %f\n", rpm);
|
||||
// printf("rpm %f\n", rpm);
|
||||
|
||||
if (!gotRpm && rpm) {
|
||||
gotRpm = true;
|
||||
|
||||
// EXPECT_EQ(eventCount, 7);
|
||||
EXPECT_NEAR(rpm, 419.42f, 0.1);
|
||||
EXPECT_NEAR(rpm, firstRpm, 0.1);
|
||||
}
|
||||
}
|
||||
ASSERT_TRUE(gotRpm);
|
||||
ASSERT_EQ(0, engine->triggerCentral.triggerState.totalTriggerErrorCounter);
|
||||
ASSERT_EQ(16, engine->triggerCentral.triggerState.getCrankSynchronizationCounter());
|
||||
ASSERT_EQ(totalErrors, engine->triggerCentral.triggerState.totalTriggerErrorCounter);
|
||||
ASSERT_EQ(syncCounter, engine->triggerCentral.triggerState.getCrankSynchronizationCounter());
|
||||
}
|
||||
|
||||
|
||||
TEST(real6g72, data) {
|
||||
runTriggerTest("tests/trigger/resources/3000gt.csv", 0, 16, 419.42f);
|
||||
}
|
||||
|
||||
TEST(real6g72, data2) {
|
||||
runTriggerTest("tests/trigger/resources/3000gt_cranking_cam_first_crank_second_only_cam.csv", 4, 0, 376.20f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue