mirror of https://github.com/rusefi/rusefi.git
6G72 Trigger Pattern #5593
This commit is contained in:
parent
fb406525f5
commit
540e142c28
|
@ -41,14 +41,14 @@ void initializeMitsubishi4gSymmetricalCrank(TriggerWaveform *s) {
|
||||||
|
|
||||||
// https://github.com/rusefi/rusefi/issues/5593
|
// https://github.com/rusefi/rusefi/issues/5593
|
||||||
void initializeVvt6G72(TriggerWaveform *s) {
|
void initializeVvt6G72(TriggerWaveform *s) {
|
||||||
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Both);
|
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Rise);
|
||||||
|
|
||||||
s->setTriggerSynchronizationGap(0.29);
|
s->setTriggerSynchronizationGap(0.8);
|
||||||
s->setSecondTriggerSynchronizationGap(1.65);
|
s->setSecondTriggerSynchronizationGap(1.9);
|
||||||
int narrowWidth = 40 / 2;
|
int narrowWidth = 30;
|
||||||
|
|
||||||
// special wider tooth
|
// special wider tooth
|
||||||
s->addToothRiseFall(90 * 1, 85.0 / 2);
|
s->addToothRiseFall(90 * 1, 60);
|
||||||
|
|
||||||
s->addToothRiseFall(90 * 2, narrowWidth);
|
s->addToothRiseFall(90 * 2, narrowWidth);
|
||||||
s->addToothRiseFall(90 * 3, narrowWidth);
|
s->addToothRiseFall(90 * 3, narrowWidth);
|
||||||
|
|
|
@ -13,6 +13,7 @@ TESTS_SRC_CPP = \
|
||||||
tests/trigger/test_real_cranking_miata_NA.cpp \
|
tests/trigger/test_real_cranking_miata_NA.cpp \
|
||||||
tests/trigger/test_real_cranking_miata_na6.cpp \
|
tests/trigger/test_real_cranking_miata_na6.cpp \
|
||||||
tests/trigger/test_real_cranking_nissan_vq40.cpp \
|
tests/trigger/test_real_cranking_nissan_vq40.cpp \
|
||||||
|
tests/trigger/test_real_6g72_3000gt.cpp \
|
||||||
tests/trigger/test_real_cas_24_plus_1.cpp \
|
tests/trigger/test_real_cas_24_plus_1.cpp \
|
||||||
tests/trigger/test_trigger_skipped_wheel.cpp \
|
tests/trigger/test_trigger_skipped_wheel.cpp \
|
||||||
tests/trigger/test_real_4b11.cpp \
|
tests/trigger/test_real_4b11.cpp \
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
#include "logicdata_csv_reader.h"
|
||||||
|
|
||||||
|
TEST(real6g72, data) {
|
||||||
|
|
||||||
|
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||||
|
|
||||||
|
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||||
|
engineConfiguration->alwaysInstantRpm = true;
|
||||||
|
engineConfiguration->invertPrimaryTriggerSignal = false;
|
||||||
|
|
||||||
|
engineConfiguration->isPhaseSyncRequiredForIgnition = true;
|
||||||
|
|
||||||
|
eth.setTriggerType(trigger_type_e::TT_VVT_MITSU_6G72);
|
||||||
|
|
||||||
|
ASSERT_FALSE(engine->triggerCentral.triggerShape.shapeDefinitionError);
|
||||||
|
|
||||||
|
engineConfiguration->vvtMode[0] = VVT_INACTIVE;
|
||||||
|
|
||||||
|
bool gotRpm = false;
|
||||||
|
|
||||||
|
CsvReader reader(/*trigger channels count*/1, /* vvtCount */ 0);
|
||||||
|
reader.flipOnRead = true;
|
||||||
|
|
||||||
|
reader.open("tests/trigger/resources/3000gt.csv");
|
||||||
|
while (reader.haveMore()) {
|
||||||
|
reader.processLine(ð);
|
||||||
|
auto rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||||
|
printf("rpm %f\n", rpm);
|
||||||
|
|
||||||
|
if (!gotRpm && rpm) {
|
||||||
|
gotRpm = true;
|
||||||
|
|
||||||
|
// EXPECT_EQ(eventCount, 7);
|
||||||
|
EXPECT_NEAR(rpm, 419.42f, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ASSERT_TRUE(gotRpm);
|
||||||
|
}
|
Loading…
Reference in New Issue