From a6fbb9819372d0a091861619b44c3bb95c1256fc Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 27 Sep 2021 22:04:03 -0400 Subject: [PATCH] Complete fuel cut, maybe by wall wetting? Warning on decel (?) CUSTOM_OBD_SKIPPED_FUEL = 9010 fix #3225 --- .../controllers/engine_cycle/main_trigger_callback.cpp | 3 +++ unit_tests/tests/trigger/test_trigger_decoder.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index bda78baa25..62eb389f6f 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -244,6 +244,8 @@ void InjectionEvent::onTriggerTooth(size_t trgEventIndex, int rpm, efitick_t now // we are ignoring low RPM in order not to handle "engine was stopped to engine now running" transition +/* + * Wall Wetting would totally skip fuel on sudden deceleration a if (rpm > 2 * engineConfiguration->cranking.rpm) { const char *outputName = outputs[0]->name; if (engine->prevOutputName == outputName @@ -253,6 +255,7 @@ void InjectionEvent::onTriggerTooth(size_t trgEventIndex, int rpm, efitick_t now } engine->prevOutputName = outputName; } +*/ #if EFI_PRINTF_FUEL_DETAILS if (printFuelDebug) { diff --git a/unit_tests/tests/trigger/test_trigger_decoder.cpp b/unit_tests/tests/trigger/test_trigger_decoder.cpp index 403f326b20..39e2c424e2 100644 --- a/unit_tests/tests/trigger/test_trigger_decoder.cpp +++ b/unit_tests/tests/trigger/test_trigger_decoder.cpp @@ -916,8 +916,10 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) { //// assertInjectorDownEvent("8@8", 8, MS2US(45), 1); //// assertInjectorDownEvent("8@9", 9, MS2US(55), 0); - ASSERT_EQ( 1, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndMedium"; + ASSERT_EQ( 0, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndMedium"; +/* ASSERT_EQ(CUSTOM_OBD_SKIPPED_FUEL, unitTestWarningCodeState.recentWarnings.get(0)); +*/ } void setInjectionMode(int value DECLARE_ENGINE_PARAMETER_SUFFIX) { @@ -1094,8 +1096,10 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) { eth.moveTimeForwardUs(MS2US(20)); eth.executeActions(); - ASSERT_EQ( 1, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndLarge"; + ASSERT_EQ( 0, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndLarge"; + /* ASSERT_EQ(CUSTOM_OBD_SKIPPED_FUEL, unitTestWarningCodeState.recentWarnings.get(0)); +*/ } TEST(big, testSparkReverseOrderBug319) {