diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index 9e733b982a..2f4ef476ae 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -321,6 +321,10 @@ void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // see also setDefaultEtbBiasCurve } +void setIssue898(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA; +} + // TLE8888_BENCH_ENGINE // set engine_type 59 void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { diff --git a/firmware/config/engines/custom_engine.h b/firmware/config/engines/custom_engine.h index d287bce89e..210b04562b 100644 --- a/firmware/config/engines/custom_engine.h +++ b/firmware/config/engines/custom_engine.h @@ -17,6 +17,7 @@ void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setIssue898(DECLARE_CONFIG_PARAMETER_SIGNATURE); void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE); #endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */ diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index dcd4b512c4..6eb65baacc 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -102,6 +102,7 @@ static const fuel_table_t miataNA6_maf_fuel_table = { static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA; + engineConfiguration->useOnlyRisingEdgeForTrigger = false; engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.firingOrder = FO_1_3_4_2; diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 9798ef888c..b0dbc7defd 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -667,8 +667,8 @@ case LM_SPEED_DENSITY: } const char *getEngine_type_e(engine_type_e value){ switch(value) { -case ACURA_RSX: - return "ACURA_RSX"; +case ISSUE_898: + return "ISSUE_898"; case AUDI_AAN: return "AUDI_AAN"; case BMW_E34: diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 6734f72bcf..00112b38e4 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1055,7 +1055,9 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb case MRE_MIATA_NA6: setMiataNA6_VAF_MRE(PASS_CONFIG_PARAMETER_SIGNATURE); break; - case ACURA_RSX: + case ISSUE_898: + setIssue898(PASS_CONFIG_PARAMETER_SIGNATURE); + break; case MINI_COOPER_R50: case MINIMAL_PINS: // all basic settings are already set in prepareVoidConfiguration(), no need to set anything here diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 213974f073..d9e8fb16e5 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -106,7 +106,10 @@ typedef enum { TEST_ENGINE = 26, - ACURA_RSX = 27, + // used by unit test + // see https://github.com/rusefi/rusefi/issues/898 + // see TriggerShape::bothFrontsRequired + ISSUE_898 = 27, MAZDA_626 = 28, diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index ef68ee14c5..2f431f9cfb 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -812,6 +812,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20190806; + return 20190808; } #endif /* EFI_UNIT_TEST */ diff --git a/unit_tests/tests/test_issue_898.cpp b/unit_tests/tests/test_issue_898.cpp index d18216209d..fa23412712 100644 --- a/unit_tests/tests/test_issue_898.cpp +++ b/unit_tests/tests/test_issue_898.cpp @@ -15,7 +15,7 @@ static void boardConfigurationForIssue898(engine_configuration_s *engineConfigur } TEST(issues, issue898) { - EngineTestHelper eth(MRE_MIATA_NA6, &boardConfigurationForIssue898); + EngineTestHelper eth(ISSUE_898, &boardConfigurationForIssue898); EXPAND_EngineTestHelper; ASSERT_EQ(TRUE, engine->triggerCentral.triggerShape.shapeDefinitionError) << "MRE_MIATA_NA6 shapeDefinitionError";