Support individually-wired wasted spark on odd cylinder engines (especially 3cyl) #4195

only:unit test skeleton
This commit is contained in:
Andrey 2024-08-31 00:16:49 -04:00
parent e7b4413c16
commit 564cec3ed2
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#include "pch.h"
using ::testing::_;
static const angle_t timing = 6; // same timing cranking and running modes
TEST(threeCylinders, crankWastedSpark) {
EngineTestHelper eth(engine_type_e::MITSUBISHI_3A92);
setTable(config->ignitionTable, timing); // this changes run mode timing
engineConfiguration->crankingTimingAngle = timing;
engine->tdcMarkEnabled = false; // reduce event queue noise TODO extract helper method
engineConfiguration->isInjectionEnabled = false; // reduce event queue / less distraction
// just simpler to use trivial trigger in tests, does not make a difference for actual scheduling
eth.setTriggerType(trigger_type_e::TT_HALF_MOON);
// see 'test_odd_firing_engine.cpp' which is the nicest relevant test at the moment
// see https://github.com/rusefi/rusefi/issues/4195#issuecomment-2322760547
}

View File

@ -46,6 +46,7 @@ TESTS_SRC_CPP = \
tests/ignition_injection/test_fuel_computer.cpp \
tests/ignition_injection/test_injector_model.cpp \
tests/ignition_injection/test_odd_firing_engine.cpp \
tests/ignition_injection/test_three_cylinder.cpp \
tests/util/test_base.cpp \
tests/ac/ac_test_base.cpp \
tests/ac/ac_pressure_test.cpp \