mirror of https://github.com/rusefi/rusefi-1.git
Restore testPulsePerRev #2130
This commit is contained in:
parent
a19537f47e
commit
7e201990d3
|
@ -6,7 +6,7 @@ extern float getTachDuty(void);
|
|||
|
||||
TEST(tachometer, testPulsePerRev) {
|
||||
// This engine has a tach pin set - we need that
|
||||
WITH_ENGINE_TEST_HELPER(BMW_E34);
|
||||
WITH_ENGINE_TEST_HELPER(MAZDA_MIATA_2003);
|
||||
|
||||
// We don't actually care about ign/inj at all, just tach
|
||||
engineConfiguration->isInjectionEnabled = false;
|
||||
|
@ -18,6 +18,21 @@ TEST(tachometer, testPulsePerRev) {
|
|||
engineConfiguration->tachPulseDuractionMs = 0.5f;
|
||||
engineConfiguration->tachPulseDurationAsDutyCycle = true;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
|
||||
engineConfiguration->tachOutputPin = GPIOC_8;
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
||||
engineConfiguration->trigger.customTotalToothCount = 30;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||
|
||||
// Set predictable trigger settings
|
||||
engineConfiguration->trigger.customTotalToothCount = 8;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 0;
|
||||
|
@ -32,9 +47,10 @@ TEST(tachometer, testPulsePerRev) {
|
|||
ASSERT_EQ(1500, GET_RPM()) << "RPM";
|
||||
ASSERT_EQ(15, engine->triggerCentral.triggerState.getCurrentIndex()) << "index #1";
|
||||
ASSERT_EQ(engine->triggerCentral.triggerState.shaft_is_synchronized, true);
|
||||
/* TODO Restore testPulsePerRev #2130
|
||||
ASSERT_EQ(100,getTachFreq());
|
||||
ASSERT_EQ(0.5,getTachDuty());
|
||||
std::cerr << "Tach Freq: " << getTachFreq() << "\n" << std::endl;
|
||||
std::cerr << "Tach Duty: " << getTachDuty() << "\n" << std::endl;
|
||||
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue