"Single Tooth" renamed to "Half Moon", more proper "Single Tooth" crank trigger as a new trigger fix #5488

This commit is contained in:
rusefillc 2023-08-06 00:46:33 -04:00
parent 58c5e9a36c
commit d77fb3bf24
10 changed files with 11 additions and 11 deletions

View File

@ -389,7 +389,7 @@ void EngineTestHelper::executeUntil(int timeUs) {
void setupSimpleTestEngineWithMafAndTT_ONE_trigger(EngineTestHelper *eth, injection_mode_e injectionMode) {
setCamOperationMode();
setupSimpleTestEngineWithMaf(eth, injectionMode, trigger_type_e::TT_ONE);
setupSimpleTestEngineWithMaf(eth, injectionMode, trigger_type_e::TT_HALF_MOON);
}
void setVerboseTrigger(bool isEnabled) {

View File

@ -67,7 +67,7 @@ TEST(fuel, testWallWettingEnrichmentScheduling) {
setCrankOperationMode();
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
eth.fireTriggerEvents2(/* count */ 4, 25 /* ms */);

View File

@ -16,7 +16,7 @@ TEST(issues, issueOneCylinderSpecialCase968) {
setCrankOperationMode();
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
ASSERT_EQ( 0, engine->executor.size()) << "start";

View File

@ -47,7 +47,7 @@ TEST(fuel, testTpsAccelEnrichmentScheduling) {
engineConfiguration->tpsAccelEnrichmentThreshold = 5;
engineConfiguration->tpsAccelLookback = 2;
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
Sensor::setMockValue(SensorType::Tps1, 0);

View File

@ -16,7 +16,7 @@ TEST(trigger, twoStrokeSingleToothTrigger) {
EngineTestHelper eth(engine_type_e::TEST_CRANK_ENGINE);
setTwoStrokeOperationMode();
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
eth.smartFireTriggerEvents2(/*count*/20, /*delay*/ 40);
ASSERT_EQ(750, Sensor::getOrZero(SensorType::Rpm));

View File

@ -11,7 +11,7 @@ TEST(sensors, test2jz) {
EngineTestHelper eth(engine_type_e::TOYOTA_2JZ_GTE_VVTi);
engineConfiguration->isFasterEngineSpinUpEnabled = false;
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
ASSERT_EQ( 0, Sensor::getOrZero(SensorType::Rpm)) << "test2jz RPM";
for (int i = 0; i < 2;i++) {

View File

@ -15,7 +15,7 @@ extern WaveChart waveChart;
TEST(trigger, testNoStartUpWarningsNoSyncronizationTrigger) {
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
// one tooth does not need synchronization it just counts tooth
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
ASSERT_EQ( 0, round(Sensor::getOrZero(SensorType::Rpm))) << "testNoStartUpWarnings RPM";
eth.fireTriggerEvents2(/*count*/10, /*duration*/50);
@ -86,7 +86,7 @@ TEST(trigger, testCamInput) {
setCrankOperationMode();
engineConfiguration->vvtMode[0] = VVT_SINGLE_TOOTH;
engineConfiguration->vvtOffsets[0] = 360;
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
engineConfiguration->camInputs[0] = Gpio::A10; // we just need to indicate that we have CAM
ASSERT_EQ( 0, round(Sensor::getOrZero(SensorType::Rpm))) << "testCamInput RPM";

View File

@ -20,7 +20,7 @@ TEST(trigger, testQuadCam) {
engineConfiguration->camInputs[0] = Gpio::A10; // we just need to indicate that we have CAM
// this crank trigger would be easier to test, crank shape is less important for this test
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
ASSERT_EQ(0, Sensor::getOrZero(SensorType::Rpm));

View File

@ -13,7 +13,7 @@ static void runRpmTest(bool isTwoStroke, bool isCam, int expected) {
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
engineConfiguration->twoStroke = isTwoStroke;
engineConfiguration->skippedWheelOnCam = isCam;
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
eth.smartFireTriggerEvents2(/*count*/200, /*delay*/ 40);
ASSERT_EQ(expected, Sensor::getOrZero(SensorType::Rpm));

View File

@ -1028,7 +1028,7 @@ TEST(big, testSparkReverseOrderBug319) {
// this is needed to update injectorLag
engine->updateSlowSensors();
eth.setTriggerType(trigger_type_e::TT_ONE);
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
eth.engine.periodicFastCallback();
setWholeTimingTable(0);