restore testQuadCam #2911
This commit is contained in:
parent
a12c1f6756
commit
9dfc066bce
|
@ -10,7 +10,6 @@ TEST(trigger, testQuadCam) {
|
||||||
WITH_ENGINE_TEST_HELPER(FORD_ESCORT_GT);
|
WITH_ENGINE_TEST_HELPER(FORD_ESCORT_GT);
|
||||||
|
|
||||||
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
|
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
|
||||||
// setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
engineConfiguration->vvtMode[0] = VVT_2JZ;
|
engineConfiguration->vvtMode[0] = VVT_2JZ;
|
||||||
engineConfiguration->vvtMode[1] = VVT_MIATA_NB2;
|
engineConfiguration->vvtMode[1] = VVT_MIATA_NB2;
|
||||||
|
@ -56,20 +55,20 @@ TEST(trigger, testQuadCam) {
|
||||||
// this second important front would give us first real VVT gap duration
|
// this second important front would give us first real VVT gap duration
|
||||||
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCam PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCam PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition(0, 0));
|
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition(0, firstCam));
|
||||||
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
||||||
|
|
||||||
eth.moveTimeForwardUs(MS2US(130 / d));
|
eth.moveTimeForwardUs(MS2US(130 / d));
|
||||||
// this third important front would give us first comparison between two real gaps
|
// this third important front would give us first comparison between two real gaps
|
||||||
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCam PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCam PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
ASSERT_NEAR(0, engine->triggerCentral.getVVTPosition(0, 1), EPS3D);
|
ASSERT_NEAR(0, engine->triggerCentral.getVVTPosition(0, secondCam), EPS3D);
|
||||||
// actually position based on VVT!
|
// actually position based on VVT!
|
||||||
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
||||||
|
|
||||||
|
|
||||||
int secondCamSecondBank = 3;
|
|
||||||
int secondBank = 1;
|
int secondBank = 1;
|
||||||
|
int secondCamSecondBank = secondBank * CAMS_PER_BANK + secondCam;
|
||||||
|
|
||||||
// this would be ignored since we only consume the other kind of fronts here
|
// this would be ignored since we only consume the other kind of fronts here
|
||||||
hwHandleVvtCamSignal(TV_FALL, getTimeNowNt(), secondCamSecondBank PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_FALL, getTimeNowNt(), secondCamSecondBank PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -81,7 +80,7 @@ TEST(trigger, testQuadCam) {
|
||||||
// this second important front would give us first real VVT gap duration
|
// this second important front would give us first real VVT gap duration
|
||||||
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCamSecondBank PASS_ENGINE_PARAMETER_SUFFIX);
|
hwHandleVvtCamSignal(TV_RISE, getTimeNowNt(), secondCamSecondBank PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition(0, 0));
|
ASSERT_FLOAT_EQ(0, engine->triggerCentral.getVVTPosition(0, firstCam));
|
||||||
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter());
|
||||||
|
|
||||||
eth.moveTimeForwardUs(MS2US(130 / d));
|
eth.moveTimeForwardUs(MS2US(130 / d));
|
||||||
|
|
Loading…
Reference in New Issue