custom-board-bundle-sample-.../unit_tests/tests/trigger/test_quad_cam.cpp

24 lines
655 B
C++
Raw Normal View History

2021-02-08 13:16:26 -08:00
/**
* @file test_quad_cam.cpp
*
*/
#include "engine_test_helper.h"
TEST(trigger, testQuadCam) {
2021-02-08 15:08:26 -08:00
// setting some weird engine
2021-02-08 13:16:26 -08:00
WITH_ENGINE_TEST_HELPER(FORD_ESCORT_GT);
2021-02-08 15:08:26 -08:00
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
engineConfiguration->vvtMode = VVT_2JZ;
2021-02-08 15:20:53 -08:00
engineConfiguration->secondVvtMode = VVT_MIATA_NB2;
2021-02-08 15:08:26 -08:00
eth.setTriggerType(TT_ONE PASS_ENGINE_PARAMETER_SUFFIX);
engineConfiguration->camInputs[0] = GPIOA_10; // we just need to indicate that we have CAM
ASSERT_EQ( 0, GET_RPM()) << "testCamInput RPM";
2021-02-08 13:16:26 -08:00
}