diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 05dfb73b8c..7aa3b18efc 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -606,7 +606,6 @@ case MIATA_1990: case MIATA_1994_DEVIATOR: return "MIATA_1994_DEVIATOR"; case MIATA_1994_SPAGS: - return "MIATA_1994_SPAGS"; case MIATA_1996: return "MIATA_1996"; case MIATA_NA6_MAP: diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 3bfb4d55e7..6615b9c8d5 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -145,6 +145,8 @@ static const fuel_table_t veDodgeNeon2003Table = { EXTERN_CONFIG; void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); + engineConfiguration->trigger.type = TT_DODGE_NEON_1995; engineConfiguration->fuelAlgorithm = LM_ALPHA_N; @@ -249,6 +251,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { } void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->trigger.type = TT_DODGE_NEON_2003_CAM; setFrankenso_01_LCD(boardConfiguration); setFrankenso0_1_joystick(engineConfiguration); @@ -500,9 +503,5 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // end of setDodgeNeonNGCEngineConfiguration } -void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - setDodgeNeonNGCEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); -} - #endif /* EFI_SUPPORT_DODGE_NEON */ diff --git a/firmware/config/engines/mazda_miata.cpp b/firmware/config/engines/mazda_miata.cpp index 8006dd5479..1fb23affaa 100644 --- a/firmware/config/engines/mazda_miata.cpp +++ b/firmware/config/engines/mazda_miata.cpp @@ -326,47 +326,6 @@ void setMiata1994_d(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; } -void setMiata1994_s(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - setMiata1994_common(PASS_CONFIG_PARAMETER_SIGNATURE); - engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2; - - boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; - - engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso - - engineConfiguration->afr.hwChannel = EFI_ADC_3; - setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX); - - /** - * This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue - */ - boardConfiguration->injectionPins[0] = GPIOD_3; // avoiding PE1 - boardConfiguration->injectionPins[1] = GPIOE_2; // injector #2 - boardConfiguration->injectionPins[2] = GPIOB_8; // injector #3 - boardConfiguration->injectionPins[3] = GPIOB_7; // injector #4 - - // setFsio(engineConfiguration, 0, GPIOD_11, "coolant 80 >"); - boardConfiguration->idle.solenoidFrequency = 500; - - engineConfiguration->acCutoffLowRpm = 400; - engineConfiguration->acCutoffHighRpm = 4500; - engineConfiguration->acIdleRpmBump = 200; - - //engineConfiguration->idleMode != IM_AUTO; - setTargetRpmCurve(800 PASS_CONFIG_PARAMETER_SUFFIX); - - - engineConfiguration->tpsMax = 86; - engineConfiguration->tpsMin = 596; - - boardConfiguration->malfunctionIndicatorPin = GPIOE_5; - boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; - - engineConfiguration->fuelAlgorithm = LM_REAL_MAF; - setMazdaMiataNAMaf(config); - engineConfiguration->injector.flow = 230; -} - /** * Tom tomiata, Frankenstein board */ diff --git a/firmware/config/engines/mazda_miata.h b/firmware/config/engines/mazda_miata.h index 7e3f69e818..aa07cad372 100644 --- a/firmware/config/engines/mazda_miata.h +++ b/firmware/config/engines/mazda_miata.h @@ -17,7 +17,6 @@ void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration); void setMiata1990(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiata1994_d(DECLARE_CONFIG_PARAMETER_SIGNATURE); -void setMiata1994_s(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE); #endif /* MAZDA_MIATA_H_ */ diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index 47b56a231b..c84624c382 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -198,6 +198,8 @@ static void setMiataNA6_settings(DECLARE_CONFIG_PARAMETER_SIGNATURE) { * MIATA_NA6_MAP */ void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); + setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); boardConfiguration->isHip9011Enabled = false; diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index d98ea0bb23..5f0482fdcf 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -744,7 +744,6 @@ case MIATA_1990: case MIATA_1994_DEVIATOR: return "MIATA_1994_DEVIATOR"; case MIATA_1994_SPAGS: - return "MIATA_1994_SPAGS"; case MIATA_1996: return "MIATA_1996"; case MIATA_NA6_MAP: diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 8128999997..2cf7fb3eb7 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -532,7 +532,7 @@ static void setDefaultStepperIdleParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) engineConfiguration->idleStepperTotalSteps = 150; } -static void setCanFrankensoDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +static void setCanFrankensoDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->canDeviceMode = CD_USE_CAN2; boardConfiguration->canTxPin = GPIOB_6; boardConfiguration->canRxPin = GPIOB_12; @@ -957,9 +957,9 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { /** * @brief Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.) */ -static void setDefaultFrankensoConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +void setDefaultFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - setCanFrankensoDefaults(PASS_ENGINE_PARAMETER_SIGNATURE); + setCanFrankensoDefaults(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->map.sensor.hwChannel = EFI_ADC_4; engineConfiguration->clt.adcChannel = EFI_ADC_6; @@ -1004,7 +1004,7 @@ static void setDefaultFrankensoConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) // set optional subsystem configs #if EFI_MEMS // this would override some values from above - configureAccelerometerPins(PASS_ENGINE_PARAMETER_SIGNATURE); + configureAccelerometerPins(PASS_CONFIG_PARAMETER_SIGNATURE); #endif /* EFI_MEMS */ #if EFI_HIP_9011 @@ -1012,7 +1012,7 @@ static void setDefaultFrankensoConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) #endif /* EFI_HIP_9011 */ #if EFI_FILE_LOGGING - setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultSdCardParameters(PASS_CONFIG_PARAMETER_SIGNATURE); #endif /* EFI_FILE_LOGGING */ boardConfiguration->is_enabled_spi_1 = false; @@ -1047,7 +1047,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb */ switch (engineType) { case DEFAULT_FRANKENSO: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MRE_MIATA_NA6: @@ -1067,16 +1067,11 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb break; #if EFI_SUPPORT_DODGE_NEON case DODGE_NEON_1995: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setDodgeNeon1995EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case DODGE_NEON_2003_CAM: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); - setDodgeNeonNGCEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); - break; case DODGE_NEON_2003_CRANK: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); - setDodgeNeonNGCEngineConfigurationCrankBased(PASS_CONFIG_PARAMETER_SIGNATURE); + setDodgeNeonNGCEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case LADA_KALINA: setLadaKalina(PASS_CONFIG_PARAMETER_SIGNATURE); @@ -1085,7 +1080,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb #endif /* EFI_SUPPORT_DODGE_NEON */ #if EFI_SUPPORT_FORD_ASPIRE case FORD_ASPIRE_1996: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setFordAspireEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; #endif /* EFI_SUPPORT_FORD_ASPIRE */ @@ -1106,15 +1101,13 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setZil130(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MIATA_NA6_MAP: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMiataNA6_MAP_Frankenso(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MIATA_NA6_VAF: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMiataNA6_VAF_Frankenso(PASS_CONFIG_PARAMETER_SIGNATURE); break; case ETB_BENCH_ENGINE: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setEtbTestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MICRO_RUS_EFI: @@ -1124,7 +1117,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setTle8888TestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_MIATA_NA8: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNA8Configuration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case TEST_CIVIC_4_0_BOTH: @@ -1140,19 +1132,19 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setHondaAccordConfiguration1_24_shifted(PASS_CONFIG_PARAMETER_SIGNATURE); break; case FRANKENSO_QA_ENGINE: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setFrankensoBoardTestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case HONDA_ACCORD_CD_DIP: setHondaAccordConfigurationDip(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MITSU_4G93: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMitsubishiConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; #if EFI_SUPPORT_1995_FORD_INLINE_6 case FORD_INLINE_6_1995: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setFordInline6(PASS_CONFIG_PARAMETER_SIGNATURE); break; #endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */ @@ -1160,11 +1152,11 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setGy6139qmbDefaultEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case HONDA_600: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setHonda600(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_MIATA_NB1: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMazdaMiataNb1EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_323: @@ -1177,38 +1169,35 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setSuzukiVitara(PASS_CONFIG_PARAMETER_SIGNATURE); break; case FORD_ESCORT_GT: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setFordEscortGt(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MIATA_1990: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMiata1990(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MIATA_1994_DEVIATOR: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMiata1994_d(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MIATA_1994_SPAGS: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); - setMiata1994_s(PASS_CONFIG_PARAMETER_SIGNATURE); - break; case MIATA_1996: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMiata1996(PASS_CONFIG_PARAMETER_SIGNATURE); break; case CITROEN_TU3JP: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setCitroenBerlingoTU3JPConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case ROVER_V8: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setRoverv8(PASS_CONFIG_PARAMETER_SIGNATURE); break; case SUBARU_2003_WRX: setSubaru2003Wrx(PASS_CONFIG_PARAMETER_SIGNATURE); break; case BMW_E34: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setBmwE34(PASS_CONFIG_PARAMETER_SIGNATURE); break; case DODGE_RAM: @@ -1218,7 +1207,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setDodgeStratus(PASS_CONFIG_PARAMETER_SIGNATURE); break; case VW_ABA: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setVwAba(PASS_CONFIG_PARAMETER_SIGNATURE); break; #if EFI_UNIT_TEST @@ -1234,19 +1223,19 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb #endif case TEST_ENGINE: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_MIATA_2003: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_MIATA_2003_NA_RAIL: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfigurationNaFuelRail(PASS_CONFIG_PARAMETER_SIGNATURE); break; case MAZDA_MIATA_2003_BOARD_TEST: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfigurationBoardTest(PASS_CONFIG_PARAMETER_SIGNATURE); break; case PROMETHEUS_DEFAULTS: @@ -1256,18 +1245,18 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setSubaruEJ20GDefaults(PASS_CONFIG_PARAMETER_SIGNATURE); break; case TEST_ENGINE_VVT: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setTestVVTEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; case SACHS: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setSachs(PASS_CONFIG_PARAMETER_SIGNATURE); break; case DAIHATSU: setDaihatsu(PASS_CONFIG_PARAMETER_SIGNATURE); break; case CAMARO_4: - setDefaultFrankensoConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setCamaro4(PASS_CONFIG_PARAMETER_SIGNATURE); break; case CHEVY_C20_1973: diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 099be87d5d..77bf37654c 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -81,6 +81,7 @@ void copyFuelTable(fuel_table_t const source, fuel_table_t destination); void copyTimingTable(ignition_table_t const source, ignition_table_t destination); void emptyCallbackWithConfiguration(engine_configuration_s * engine); +void setDefaultFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); typedef void (*configuration_callback_t)(engine_configuration_s*);