The Big Refactoring of 2019: DECLARE_ENGINE_PARAMETER_SUFFIX consistency and simplification #657

maybe probably pointless refactoring? reducing parameters visibility
This commit is contained in:
rusefi 2019-05-03 18:41:43 -04:00
parent fb515f3fa3
commit ac2a81d381
88 changed files with 353 additions and 363 deletions

View File

@ -191,7 +191,7 @@ void setBoardConfigurationOverrides(void) {
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
// starter block // starter block
setFsio(0, (is469 ? GPIOB_10 : GPIOB_1), STARTER_BLOCK PASS_ENGINE_PARAMETER_SUFFIX); setFsio(0, (is469 ? GPIOB_10 : GPIOB_1), STARTER_BLOCK PASS_CONFIG_PARAMETER_SUFFIX);
// debug pad // debug pad

View File

@ -160,7 +160,7 @@ void setBoardConfigurationOverrides(void) {
// starter block // starter block
/* Starter signal connected through MC33972 - SG11 */ /* Starter signal connected through MC33972 - SG11 */
//setFsio(0, (GPIOB_1), STARTER_BLOCK PASS_ENGINE_PARAMETER_SUFFIX); //setFsio(0, (GPIOB_1), STARTER_BLOCK PASS_CONFIG_PARAMETER_SUFFIX);
// not used // not used

View File

@ -14,8 +14,7 @@
#include "allsensors.h" #include "allsensors.h"
#include "advance_map.h" #include "advance_map.h"
EXTERN_ENGINE EXTERN_CONFIG;
;
static const fuel_table_t default_139qmb_fuel_table = { static const fuel_table_t default_139qmb_fuel_table = {
@ -64,7 +63,7 @@ static const fuel_table_t default_139qmb_fuel_table = {
}; };
static void setDefault139qmbMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void setDefault139qmbMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX); setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
setFuelRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX); setFuelRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
@ -75,14 +74,14 @@ static void setDefault139qmbMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
//copyTimingTable(default_139qmb_timing_table, config->ignitionTable); //copyTimingTable(default_139qmb_timing_table, config->ignitionTable);
} }
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setGy6139qmbDefaultEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setDefault139qmbMaps(PASS_ENGINE_PARAMETER_SIGNATURE); setDefault139qmbMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
// engineConfiguration->map.sensor.type = MT_3V_SENSOR; // engineConfiguration->map.sensor.type = MT_3V_SENSOR;
setEgoSensor(ES_NarrowBand PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_NarrowBand PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->rpmHardLimit = 9000; engineConfiguration->rpmHardLimit = 9000;
engineConfiguration->cranking.rpm = 1100; engineConfiguration->cranking.rpm = 1100;
setTargetRpmCurve(2000 PASS_ENGINE_PARAMETER_SUFFIX); setTargetRpmCurve(2000 PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->analogInputDividerCoefficient = 1; engineConfiguration->analogInputDividerCoefficient = 1;
engineConfiguration->fuelAlgorithm = LM_MAP; engineConfiguration->fuelAlgorithm = LM_MAP;
engineConfiguration->globalTriggerAngleOffset = 45; engineConfiguration->globalTriggerAngleOffset = 45;

View File

@ -9,8 +9,8 @@
#ifndef GY6_139QMB_H_ #ifndef GY6_139QMB_H_
#define GY6_139QMB_H_ #define GY6_139QMB_H_
#include "engine.h" #include "engine_configuration.h"
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setGy6139qmbDefaultEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* GY6_139QMB_H_ */ #endif /* GY6_139QMB_H_ */

View File

@ -7,10 +7,11 @@
* @author Andrey Belomutskiy, (c) 2012-2018 * @author Andrey Belomutskiy, (c) 2012-2018
*/ */
#include "global.h"
#include "acura_rsx.h" #include "acura_rsx.h"
void setAcuraRSX(engine_configuration_s *engineConfiguration) { EXTERN_CONFIG;
void setAcuraRSX(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// http://injectordynamics.com/injectors/id1300-2/ // http://injectordynamics.com/injectors/id1300-2/
engineConfiguration->injector.flow = 1300; engineConfiguration->injector.flow = 1300;

View File

@ -9,6 +9,6 @@
#include "engine_configuration.h" #include "engine_configuration.h"
void setAcuraRSX(engine_configuration_s *engineConfiguration); void setAcuraRSX(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_ACURA_RSX_H_ */ #endif /* CONFIG_ENGINES_ACURA_RSX_H_ */

View File

@ -10,8 +10,5 @@
#define AUDI_AAN_H_ #define AUDI_AAN_H_
#include "global.h" #include "global.h"
#if EFI_ENGINE_AUDI_AAN
#endif /* EFI_ENGINE_AUDI_AAN */
#endif /* AUDI_AAN_H_ */ #endif /* AUDI_AAN_H_ */

View File

@ -16,10 +16,10 @@
#include "thermistors.h" #include "thermistors.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE EXTERN_CONFIG
; ;
void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setBmwE34(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// chartsize 450 // chartsize 450
engineConfiguration->engineChartSize = 450; engineConfiguration->engineChartSize = 450;
@ -69,7 +69,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->isInjectionEnabled = true; engineConfiguration->isInjectionEnabled = true;
engineConfiguration->isIgnitionEnabled = true; engineConfiguration->isIgnitionEnabled = true;
setConstantDwell(3 PASS_ENGINE_PARAMETER_SUFFIX); // a bit shorter dwell setConstantDwell(3 PASS_CONFIG_PARAMETER_SUFFIX); // a bit shorter dwell
engineConfiguration->ignMathCalculateAtIndex = 14; engineConfiguration->ignMathCalculateAtIndex = 14;
engineConfiguration->mapAveragingSchedulingAtIndex = 6; engineConfiguration->mapAveragingSchedulingAtIndex = 6;

View File

@ -8,8 +8,8 @@
#ifndef BMW_E34_H_ #ifndef BMW_E34_H_
#define BMW_E34_H_ #define BMW_E34_H_
#include "engine.h" #include "engine_configuration.h"
void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setBmwE34(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* BMW_E34_H_ */ #endif /* BMW_E34_H_ */

View File

@ -16,9 +16,9 @@
#include "chevrolet_c20_1973.h" #include "chevrolet_c20_1973.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void set1973c20(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void set1973c20(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->specs.displacement = 5.7; engineConfiguration->specs.displacement = 5.7;
engineConfiguration->specs.cylindersCount = 8; engineConfiguration->specs.cylindersCount = 8;

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_CHEVROLET_C20_1973_H_ #ifndef CONFIG_ENGINES_CHEVROLET_C20_1973_H_
#define CONFIG_ENGINES_CHEVROLET_C20_1973_H_ #define CONFIG_ENGINES_CHEVROLET_C20_1973_H_
#include "engine.h" #include "engine_configuration.h"
void set1973c20(DECLARE_ENGINE_PARAMETER_SIGNATURE); void set1973c20(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_CHEVROLET_C20_1973_H_ */ #endif /* CONFIG_ENGINES_CHEVROLET_C20_1973_H_ */

View File

@ -12,12 +12,10 @@
#include "engine_math.h" #include "engine_math.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_CONFIG;
EXTERN_ENGINE void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
; setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX); setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ #ifndef CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_
#define CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ #define CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_
#include "engine.h" #include "engine_configuration.h"
void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ */ #endif /* CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ */

View File

@ -67,9 +67,9 @@ static const ignition_table_t tps_advance_table = {
//static const float rpmSteps[16] = {400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400, 4800, 5200, 5600, 6000, 6400}; //static const float rpmSteps[16] = {400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400, 4800, 5200, 5600, 6000, 6400};
//static const float mapSteps[16] = {25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100}; //static const float mapSteps[16] = {25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100};
EXTERN_ENGINE; EXTERN_CONFIG;
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = CITROEN_TU3JP; engineConfiguration->engineType = CITROEN_TU3JP;
/** /**

View File

@ -8,8 +8,8 @@
#ifndef CITROENBERLINGOTU3JP_H_ #ifndef CITROENBERLINGOTU3JP_H_
#define CITROENBERLINGOTU3JP_H_ #define CITROENBERLINGOTU3JP_H_
#include "engine.h" #include "engine_configuration.h"
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CITROENBERLINGOTU3JP_H_ */ #endif /* CITROENBERLINGOTU3JP_H_ */

View File

@ -83,7 +83,7 @@ void disableLCD(board_configuration_s *boardConfiguration) {
// todo: should this be renamed to 'setFrankensoConfiguration'? // todo: should this be renamed to 'setFrankensoConfiguration'?
// todo: should this be part of more default configurations? // todo: should this be part of more default configurations?
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setCustomEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE; engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
setFrankenso_01_LCD(boardConfiguration); setFrankenso_01_LCD(boardConfiguration);
@ -192,8 +192,8 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif /* EFI_CAN_SUPPORT */ #endif /* EFI_CAN_SUPPORT */
} }
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
@ -243,7 +243,7 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// ETB_BENCH_ENGINE // ETB_BENCH_ENGINE
// set engine_type 58 // set engine_type 58
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
// TODO: HOW?! IS THIS HELPING USB SERIAL?! // TODO: HOW?! IS THIS HELPING USB SERIAL?!
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
@ -266,7 +266,7 @@ void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
CONFIGB(etb1.controlPin1) = GPIOE_14; CONFIGB(etb1.controlPin1) = GPIOE_14;
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
setDefaultEtbParameters(PASS_ENGINE_PARAMETER_SIGNATURE); setDefaultEtbParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
// values are above 100% since we have feedforward part of the total summation // values are above 100% since we have feedforward part of the total summation
engineConfiguration->etb.minValue = -200; engineConfiguration->etb.minValue = -200;
engineConfiguration->etb.maxValue = 200; engineConfiguration->etb.maxValue = 200;
@ -292,7 +292,7 @@ void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// TLE8888_BENCH_ENGINE // TLE8888_BENCH_ENGINE
// set engine_type 59 // set engine_type 59
void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
// TODO: HOW?! IS THIS HELPING USB SERIAL?! // TODO: HOW?! IS THIS HELPING USB SERIAL?!
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
@ -327,8 +327,8 @@ void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// IN2 PF14 // IN2 PF14
// SF PF11 // SF PF11
#if EFI_FSIO #if EFI_FSIO
setFsio(12, GPIOF_12, "0" PASS_ENGINE_PARAMETER_SUFFIX); setFsio(12, GPIOF_12, "0" PASS_CONFIG_PARAMETER_SUFFIX);
setFsio(14, GPIOF_13, "1" PASS_ENGINE_PARAMETER_SUFFIX); setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
#endif #endif
CONFIG(etb1_use_two_wires) = true; CONFIG(etb1_use_two_wires) = true;
CONFIGB(etb1.directionPin1) = GPIOF_15; CONFIGB(etb1.directionPin1) = GPIOF_15;
@ -342,8 +342,8 @@ void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// IN2 PE4 // IN2 PE4
// SF PE3 // SF PE3
#if EFI_FSIO #if EFI_FSIO
setFsio(13, GPIOE_5, "0" PASS_ENGINE_PARAMETER_SUFFIX); setFsio(13, GPIOE_5, "0" PASS_CONFIG_PARAMETER_SUFFIX);
setFsio(15, GPIOE_6, "1" PASS_ENGINE_PARAMETER_SUFFIX); setFsio(15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
#endif #endif
CONFIG(etb2_use_two_wires) = true; CONFIG(etb2_use_two_wires) = true;
CONFIG(etb2.directionPin1) = GPIOE_2; CONFIG(etb2.directionPin1) = GPIOE_2;

View File

@ -7,14 +7,14 @@
#ifndef CONFIG_ENGINES_CUSTOM_ENGINE_H_ #ifndef CONFIG_ENGINES_CUSTOM_ENGINE_H_
#define CONFIG_ENGINES_CUSTOM_ENGINE_H_ #define CONFIG_ENGINES_CUSTOM_ENGINE_H_
#include "engine.h" #include "engine_configuration.h"
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setCustomEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration); void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
void disableLCD(board_configuration_s *boardConfiguration); void disableLCD(board_configuration_s *boardConfiguration);
void runSchedulingPrecisionTestIfNeeded(void); void runSchedulingPrecisionTestIfNeeded(void);
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */ #endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */

View File

@ -11,9 +11,9 @@
#include "global.h" #include "global.h"
#include "daihatsu.h" #include "daihatsu.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setDaihatsu(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setDaihatsu(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_36_2_2_2; engineConfiguration->trigger.type = TT_36_2_2_2;
engineConfiguration->specs.cylindersCount = 3; engineConfiguration->specs.cylindersCount = 3;

View File

@ -5,6 +5,6 @@
* @author Andrey Belomutskiy, (c) 2012-2017 * @author Andrey Belomutskiy, (c) 2012-2017
*/ */
#include "engine.h" #include "engine_configuration.h"
void setDaihatsu(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setDaihatsu(DECLARE_CONFIG_PARAMETER_SIGNATURE);

View File

@ -288,7 +288,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
* *
* set_whole_fuel_map 12 * set_whole_fuel_map 12
*/ */
//setWholeFuelMap(12 PASS_ENGINE_PARAMETER_SUFFIX); //setWholeFuelMap(12 PASS_CONFIG_PARAMETER_SUFFIX);
// copyFuelTable(alphaNfuel, config->fuelTable); // copyFuelTable(alphaNfuel, config->fuelTable);
//setWholeTimingTable_d(12 PASS_CONFIG_PARAMETER_SUFFIX); //setWholeTimingTable_d(12 PASS_CONFIG_PARAMETER_SUFFIX);
copyTimingTable(fromODB, config->ignitionTable); copyTimingTable(fromODB, config->ignitionTable);
@ -459,7 +459,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// * set_fsio_setting 1 0.55 // * set_fsio_setting 1 0.55
// */ // */
// boardConfiguration->fsio_setting[0] = 0.55; // boardConfiguration->fsio_setting[0] = 0.55;
// setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX); // setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_CONFIG_PARAMETER_SUFFIX);
#endif #endif
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8; boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;

View File

@ -11,7 +11,7 @@
#if EFI_SUPPORT_DODGE_NEON #if EFI_SUPPORT_DODGE_NEON
#include "engine.h" #include "engine_configuration.h"
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
@ -22,7 +22,6 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
*/ */
void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* EFI_SUPPORT_DODGE_NEON */ #endif /* EFI_SUPPORT_DODGE_NEON */
#endif /* DODGE_NEON_H_ */ #endif /* DODGE_NEON_H_ */

View File

@ -13,11 +13,10 @@
#include "allsensors.h" #include "allsensors.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE EXTERN_CONFIG;
;
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_DODGE_RAM; engineConfiguration->trigger.type = TT_DODGE_RAM;

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_DODGE_RAM_H_ #ifndef CONFIG_ENGINES_DODGE_RAM_H_
#define CONFIG_ENGINES_DODGE_RAM_H_ #define CONFIG_ENGINES_DODGE_RAM_H_
#include "engine.h" #include "engine_configuration.h"
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_DODGE_RAM_H_ */ #endif /* CONFIG_ENGINES_DODGE_RAM_H_ */

View File

@ -11,10 +11,9 @@
#include "dodge_stratus.h" #include "dodge_stratus.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE EXTERN_CONFIG;
;
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setDodgeStratus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_DODGE_STRATUS; engineConfiguration->trigger.type = TT_DODGE_STRATUS;
engineConfiguration->specs.cylindersCount = 6; engineConfiguration->specs.cylindersCount = 6;
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6; engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6;
@ -23,13 +22,6 @@ void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX); setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
boardConfiguration->ignitionPins[0] = GPIOC_9;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_8;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[5] = GPIO_UNASSIGNED;
} }

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_DODGE_STRATUS_H_ #ifndef CONFIG_ENGINES_DODGE_STRATUS_H_
#define CONFIG_ENGINES_DODGE_STRATUS_H_ #define CONFIG_ENGINES_DODGE_STRATUS_H_
#include "engine.h" #include "engine_configuration.h"
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setDodgeStratus(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_DODGE_STRATUS_H_ */ #endif /* CONFIG_ENGINES_DODGE_STRATUS_H_ */

View File

@ -8,8 +8,8 @@
#include "engine_template.h" #include "engine_template.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
} }

View File

@ -8,7 +8,8 @@
#ifndef CONFIG_ENGINES_ENGINE_TEMPLATE_H_ #ifndef CONFIG_ENGINES_ENGINE_TEMPLATE_H_
#define CONFIG_ENGINES_ENGINE_TEMPLATE_H_ #define CONFIG_ENGINES_ENGINE_TEMPLATE_H_
#include "engine.h" #include "engine_configuration.h"
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_ENGINE_TEMPLATE_H_ */ #endif /* CONFIG_ENGINES_ENGINE_TEMPLATE_H_ */

View File

@ -20,12 +20,12 @@
#if EFI_SUPPORT_1995_FORD_INLINE_6 #if EFI_SUPPORT_1995_FORD_INLINE_6
EXTERN_ENGINE; EXTERN_CONFIG;
/** /**
* @brief Default values for persistent properties * @brief Default values for persistent properties
*/ */
void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->specs.cylindersCount = 6; engineConfiguration->specs.cylindersCount = 6;
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
@ -40,7 +40,7 @@ void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/** /**
* 0.5ms dweel time just to be sure it would fit within camshaft revolution, dwell is not controlled by us anyway * 0.5ms dweel time just to be sure it would fit within camshaft revolution, dwell is not controlled by us anyway
*/ */
setConstantDwell(0.5 PASS_ENGINE_PARAMETER_SUFFIX); setConstantDwell(0.5 PASS_CONFIG_PARAMETER_SUFFIX);
/** /**
* We treat the trigger as 6/0 toothed wheel * We treat the trigger as 6/0 toothed wheel

View File

@ -10,6 +10,6 @@
#include "engine_configuration.h" #include "engine_configuration.h"
void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* FORD_1995_INLINE_6_H_ */ #endif /* FORD_1995_INLINE_6_H_ */

View File

@ -65,9 +65,9 @@ static const ignition_table_t default_aspire_timing_table = {
/* Load 4.400000 */{ -0.350000, -5.590000, -0.502000, -0.910000, -0.864000, -0.954000, -1.324000, +7.436000, -1.170000, -1.054000, -2.058000, -2.098000, -2.636000, +12.352000, +12.352000, +12.352000} /* Load 4.400000 */{ -0.350000, -5.590000, -0.502000, -0.910000, -0.864000, -0.954000, -1.324000, +7.436000, -1.170000, -1.054000, -2.058000, -2.098000, -2.636000, +12.352000, +12.352000, +12.352000}
}; };
EXTERN_ENGINE; EXTERN_CONFIG;
static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void setDefaultAspireMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX); setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX); setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
@ -78,7 +78,7 @@ static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
copyTimingTable(default_aspire_timing_table, config->ignitionTable); copyTimingTable(default_aspire_timing_table, config->ignitionTable);
} }
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->tpsMin = 100; engineConfiguration->tpsMin = 100;
engineConfiguration->tpsMax = 750; engineConfiguration->tpsMax = 750;
@ -104,7 +104,7 @@ void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->ignitionOffset = 87; engineConfiguration->ignitionOffset = 87;
engineConfiguration->extraInjectionOffset = 54 + 360; engineConfiguration->extraInjectionOffset = 54 + 360;
setDefaultAspireMaps(PASS_ENGINE_PARAMETER_SIGNATURE); setDefaultAspireMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
// set_cranking_rpm 550 // set_cranking_rpm 550
engineConfiguration->cranking.rpm = 550; engineConfiguration->cranking.rpm = 550;
// set cranking_charge_angle 70 // set cranking_charge_angle 70

View File

@ -12,8 +12,8 @@
#ifndef FORD_ASPIRE_H_ #ifndef FORD_ASPIRE_H_
#define FORD_ASPIRE_H_ #define FORD_ASPIRE_H_
#include "engine.h" #include "engine_configuration.h"
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* FORD_ASPIRE_H_ */ #endif /* FORD_ASPIRE_H_ */

View File

@ -60,13 +60,13 @@ static const fuel_table_t racingFestivaVeTable = {
{/* 15 160.000 *//* 0 800.0*/100.000, /* 1 1200.0*/100.000, /* 2 1600.0*/100.000, /* 3 2000.0*/100.000, /* 4 2400.0*/100.000, /* 5 2800.0*/120.000, /* 6 3200.0*/120.000, /* 7 3600.0*/120.000, /* 8 4100.0*/120.000, /* 9 4500.0*/120.000, /* 10 4900.0*/120.000, /* 11 5300.0*/120.000, /* 12 5700.0*/120.000, /* 13 6100.0*/120.000, /* 14 6500.0*/120.000, /* 15 7000.0*/120.000, }, {/* 15 160.000 *//* 0 800.0*/100.000, /* 1 1200.0*/100.000, /* 2 1600.0*/100.000, /* 3 2000.0*/100.000, /* 4 2400.0*/100.000, /* 5 2800.0*/120.000, /* 6 3200.0*/120.000, /* 7 3600.0*/120.000, /* 8 4100.0*/120.000, /* 9 4500.0*/120.000, /* 10 4900.0*/120.000, /* 11 5300.0*/120.000, /* 12 5700.0*/120.000, /* 13 6100.0*/120.000, /* 14 6500.0*/120.000, /* 15 7000.0*/120.000, },
}; };
EXTERN_ENGINE; EXTERN_CONFIG;
/** /**
* pin 1I/W9 - extra +5v * pin 1I/W9 - extra +5v
* set engine_type 14 * set engine_type 14
*/ */
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4; engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
common079721_2351(engineConfiguration, boardConfiguration); common079721_2351(engineConfiguration, boardConfiguration);
@ -125,14 +125,14 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
*/ */
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4; engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->afr.hwChannel = EFI_ADC_2; // Frankenso analog #5 // PA2 engineConfiguration->afr.hwChannel = EFI_ADC_2; // Frankenso analog #5 // PA2
// set_idle_position 10 // set_idle_position 10
boardConfiguration->manIdlePosition = 10; boardConfiguration->manIdlePosition = 10;
engineConfiguration->crankingIACposition = 65; engineConfiguration->crankingIACposition = 65;
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER_SUFFIX); setWholeIatCorrTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX);
// set global_trigger_offset_angle -37 // set global_trigger_offset_angle -37
@ -231,7 +231,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
*/ */
boardConfiguration->fsio_setting[0] = 5000; boardConfiguration->fsio_setting[0] = 5000;
// set_fsio_expression 1 "rpm > fsio_setting(1)" // set_fsio_expression 1 "rpm > fsio_setting(1)"
setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_ENGINE_PARAMETER_SUFFIX); setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_CONFIG_PARAMETER_SUFFIX);
// warning light // warning light
/** /**
@ -248,8 +248,8 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->fsio_setting[2] = 90; // CLT threshold boardConfiguration->fsio_setting[2] = 90; // CLT threshold
boardConfiguration->fsio_setting[3] = 13.5; // voltage threshold boardConfiguration->fsio_setting[3] = 13.5; // voltage threshold
// setFsio(1, GPIOC_13, "rpm 2 fsio_setting > coolant 3 fsio_setting > | vbatt 4 fsio_setting < |" PASS_ENGINE_PARAMETER_SUFFIX); // setFsio(1, GPIOC_13, "rpm 2 fsio_setting > coolant 3 fsio_setting > | vbatt 4 fsio_setting < |" PASS_CONFIG_PARAMETER_SUFFIX);
setFsio(1, GPIOD_7, RPM_ABOVE_USER_SETTING_2 PASS_ENGINE_PARAMETER_SUFFIX); setFsio(1, GPIOD_7, RPM_ABOVE_USER_SETTING_2 PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */ #endif /* EFI_FSIO */
config->ignitionRpmBins[0] = 800; config->ignitionRpmBins[0] = 800;

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_FORD_FESTIVA_H_ #ifndef CONFIG_ENGINES_FORD_FESTIVA_H_
#define CONFIG_ENGINES_FORD_FESTIVA_H_ #define CONFIG_ENGINES_FORD_FESTIVA_H_
#include "engine.h" #include "engine_configuration.h"
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_FORD_FESTIVA_H_ */ #endif /* CONFIG_ENGINES_FORD_FESTIVA_H_ */

View File

@ -16,7 +16,7 @@
#include "ford_fiesta.h" #include "ford_fiesta.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->rpmHardLimit = 7000; engineConfiguration->rpmHardLimit = 7000;

View File

@ -9,7 +9,7 @@
#define FORD_FIESTA_H_ #define FORD_FIESTA_H_
#if EFI_SUPPORT_FORD_FIESTA #if EFI_SUPPORT_FORD_FIESTA
#include "engine.h" #include "engine_configuration.h"
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);

View File

@ -8,9 +8,9 @@
#include "geo_storm.h" #include "geo_storm.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setGeoStormConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
} }

View File

@ -8,7 +8,8 @@
#ifndef CONFIG_ENGINES_GEO_STORM_H_ #ifndef CONFIG_ENGINES_GEO_STORM_H_
#define CONFIG_ENGINES_GEO_STORM_H_ #define CONFIG_ENGINES_GEO_STORM_H_
#include "engine.h" #include "engine_configuration.h"
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setGeoStormConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_GEO_STORM_H_ */ #endif /* CONFIG_ENGINES_GEO_STORM_H_ */

View File

@ -10,10 +10,9 @@
#include "global.h" #include "global.h"
#include "gm_2_2.h" #include "gm_2_2.h"
EXTERN_ENGINE EXTERN_CONFIG;
;
void setGm2_2(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setGm2_2(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2; engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_GM_2_2_H_ #ifndef CONFIG_ENGINES_GM_2_2_H_
#define CONFIG_ENGINES_GM_2_2_H_ #define CONFIG_ENGINES_GM_2_2_H_
#include "engine.h" #include "engine_configuration.h"
void setGm2_2(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setGm2_2(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_GM_2_2_H_ */ #endif /* CONFIG_ENGINES_GM_2_2_H_ */

View File

@ -45,9 +45,9 @@ static const ignition_table_t default_custom_timing_table = {
/* Load 100% */{ 10, 10, 10, 10, 10, 10, 15, 18, 20, 22, 24, 26, 28, 30, 32}, /* Load 100% */{ 10, 10, 10, 10, 10, 10, 15, 18, 20, 22, 24, 26, 28, 30, 32},
}; };
EXTERN_ENGINE; EXTERN_CONFIG;
static void setDefaultCustomMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void setDefaultCustomMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setFuelLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX); setFuelLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
setFuelRpmBin(0, 7000 PASS_CONFIG_PARAMETER_SUFFIX); setFuelRpmBin(0, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
@ -59,7 +59,7 @@ static void setDefaultCustomMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
copyTimingTable(default_custom_timing_table, config->ignitionTable); copyTimingTable(default_custom_timing_table, config->ignitionTable);
} }
void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_HONDA_CBR_600_CUSTOM; engineConfiguration->trigger.type = TT_HONDA_CBR_600_CUSTOM;
engineConfiguration->fuelAlgorithm = LM_ALPHA_N; engineConfiguration->fuelAlgorithm = LM_ALPHA_N;
@ -144,7 +144,7 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->injectionPins[2] = GPIOB_7; // #3 boardConfiguration->injectionPins[2] = GPIOB_7; // #3
boardConfiguration->injectionPins[3] = GPIOB_8; // #4 boardConfiguration->injectionPins[3] = GPIOB_8; // #4
setDefaultCustomMaps(PASS_ENGINE_PARAMETER_SIGNATURE); setDefaultCustomMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX); setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED; boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;

View File

@ -8,7 +8,8 @@
#ifndef CONFIG_ENGINES_HONDA_600_H_ #ifndef CONFIG_ENGINES_HONDA_600_H_
#define CONFIG_ENGINES_HONDA_600_H_ #define CONFIG_ENGINES_HONDA_600_H_
#include "engine.h" #include "engine_configuration.h"
void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_HONDA_600_H_ */ #endif /* CONFIG_ENGINES_HONDA_600_H_ */

View File

@ -35,9 +35,9 @@
#include "advance_map.h" #include "advance_map.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_ENGINE; EXTERN_CONFIG;
static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->map.sensor.type = MT_DENSO183; engineConfiguration->map.sensor.type = MT_DENSO183;
boardConfiguration->isFastAdcEnabled = true; boardConfiguration->isFastAdcEnabled = true;
@ -179,40 +179,40 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = HONDA_ACCORD_CD_TWO_WIRES; engineConfiguration->engineType = HONDA_ACCORD_CD_TWO_WIRES;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_CD_TWO_WIRES; engineConfiguration->trigger.type = TT_HONDA_ACCORD_CD_TWO_WIRES;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
} }
*/ */
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaAccordConfigurationThreeWires(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = HONDA_ACCORD_CD; engineConfiguration->engineType = HONDA_ACCORD_CD;
engineConfiguration->trigger.type = TT_HONDA_4_24_1; engineConfiguration->trigger.type = TT_HONDA_4_24_1;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
} }
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaAccordConfigurationDip(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = HONDA_ACCORD_CD_DIP; engineConfiguration->engineType = HONDA_ACCORD_CD_DIP;
engineConfiguration->trigger.type = TT_HONDA_1_4_24; engineConfiguration->trigger.type = TT_HONDA_1_4_24;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
} }
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaAccordConfiguration1_24(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = HONDA_ACCORD_CD_DIP; engineConfiguration->engineType = HONDA_ACCORD_CD_DIP;
engineConfiguration->trigger.type = TT_HONDA_1_24; engineConfiguration->trigger.type = TT_HONDA_1_24;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
} }
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaAccordConfiguration1_24_shifted(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = HONDA_ACCORD_1_24_SHIFTED; engineConfiguration->engineType = HONDA_ACCORD_1_24_SHIFTED;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24_SHIFTED; engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24_SHIFTED;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
// set global_trigger_offset_angle 0 // set global_trigger_offset_angle 0
engineConfiguration->globalTriggerAngleOffset = 0; engineConfiguration->globalTriggerAngleOffset = 0;
} }
void setHondaCivic4_0_both(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaCivic4_0_both(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setHondaAccordConfiguration1_24_shifted(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfiguration1_24_shifted(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->useOnlyRisingEdgeForTrigger = false; engineConfiguration->useOnlyRisingEdgeForTrigger = false;
engineConfiguration->trigger.customTotalToothCount = 4; engineConfiguration->trigger.customTotalToothCount = 4;
@ -221,8 +221,8 @@ void setHondaCivic4_0_both(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL; engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
} }
void setHondaCivic4_0_rise(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setHondaCivic4_0_rise(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setHondaAccordConfiguration1_24_shifted(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfiguration1_24_shifted(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->useOnlyRisingEdgeForTrigger = true; engineConfiguration->useOnlyRisingEdgeForTrigger = true;
engineConfiguration->trigger.customTotalToothCount = 4; engineConfiguration->trigger.customTotalToothCount = 4;

View File

@ -8,14 +8,14 @@
#ifndef HONDA_ACCORD_H_ #ifndef HONDA_ACCORD_H_
#define HONDA_ACCORD_H_ #define HONDA_ACCORD_H_
#include "engine.h" #include "engine_configuration.h"
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaAccordConfigurationTwoWires(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaAccordConfigurationThreeWires(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaAccordConfigurationDip(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaAccordConfiguration1_24(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaAccordConfiguration1_24_shifted(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaCivic4_0_both(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaCivic4_0_both(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setHondaCivic4_0_rise(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setHondaCivic4_0_rise(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* HONDA_ACCORD_H_ */ #endif /* HONDA_ACCORD_H_ */

View File

@ -11,11 +11,10 @@
#include "custom_engine.h" #include "custom_engine.h"
#include "fsio_impl.h" #include "fsio_impl.h"
EXTERN_CONFIG;
EXTERN_ENGINE; void setLadaKalina(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
disableLCD(boardConfiguration); disableLCD(boardConfiguration);
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED; boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
@ -57,6 +56,6 @@ void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
*/ */
engineConfiguration->bc.fsio_setting[0] = 500; engineConfiguration->bc.fsio_setting[0] = 500;
// set_rpn_expression 1 "rpm 0 fsio_setting <" // set_rpn_expression 1 "rpm 0 fsio_setting <"
setFsioExt(0, GPIOE_3, RPM_BELOW_USER_SETTING_1, 0 PASS_ENGINE_PARAMETER_SUFFIX); setFsioExt(0, GPIOE_3, RPM_BELOW_USER_SETTING_1, 0 PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */ #endif /* EFI_FSIO */
} }

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_LADA_KALINA_H_ #ifndef CONFIG_ENGINES_LADA_KALINA_H_
#define CONFIG_ENGINES_LADA_KALINA_H_ #define CONFIG_ENGINES_LADA_KALINA_H_
#include "engine.h" #include "engine_configuration.h"
void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setLadaKalina(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_LADA_KALINA_H_ */ #endif /* CONFIG_ENGINES_LADA_KALINA_H_ */

View File

@ -15,10 +15,10 @@
#include "fsio_impl.h" #include "fsio_impl.h"
#include "settings.h" #include "settings.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2; // engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
@ -94,12 +94,12 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// todo engineConfiguration->afr.hwChannel = EFI_ADC_3; // todo engineConfiguration->afr.hwChannel = EFI_ADC_3;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
//#if EFI_FSIO //#if EFI_FSIO
// // backup main relay pin // // backup main relay pin
// setFsio(0, GPIOE_6, "1" PASS_ENGINE_PARAMETER_SUFFIX); // setFsio(0, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
//#endif //#endif
engineConfiguration->externalKnockSenseAdc = EFI_ADC_4; engineConfiguration->externalKnockSenseAdc = EFI_ADC_4;

View File

@ -9,8 +9,8 @@
#ifndef CONFIG_ENGINES_MAZDA_626_H_ #ifndef CONFIG_ENGINES_MAZDA_626_H_
#define CONFIG_ENGINES_MAZDA_626_H_ #define CONFIG_ENGINES_MAZDA_626_H_
#include "engine.h" #include "engine_configuration.h"
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_MAZDA_626_H_ */ #endif /* CONFIG_ENGINES_MAZDA_626_H_ */

View File

@ -128,7 +128,7 @@ static void setDefaultCrankingFuel(engine_configuration_s *engineConfiguration)
EXTERN_ENGINE; EXTERN_ENGINE;
static void commonMiataNa(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA; engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
engineConfiguration->engineChartSize = 100; engineConfiguration->engineChartSize = 100;
@ -202,10 +202,10 @@ void common079721_2351(engine_configuration_s *engineConfiguration, board_config
/** /**
* Frankenstein board * Frankenstein board
*/ */
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiata1990(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
common079721_2351(engineConfiguration, boardConfiguration); common079721_2351(engineConfiguration, boardConfiguration);
commonMiataNa(PASS_ENGINE_PARAMETER_SIGNATURE); commonMiataNa(PASS_CONFIG_PARAMETER_SIGNATURE);
// Frankenstein: low side - out #1: PC14 // Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15 // Frankenstein: low side - out #2: PC15
@ -232,8 +232,8 @@ void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void setMiata1994_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
commonMiataNa(PASS_ENGINE_PARAMETER_SIGNATURE); commonMiataNa(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->specs.displacement = 1.839; engineConfiguration->specs.displacement = 1.839;
// set cranking_timing_angle 0 // set cranking_timing_angle 0
@ -306,8 +306,8 @@ static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
* Frankenso board * Frankenso board
* set engine_type 20 * set engine_type 20
*/ */
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiata1994_d(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setMiata1994_common(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1994_common(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->vbattDividerCoeff = ((float) (8.2 + 33)) / 8.2 * 2; engineConfiguration->vbattDividerCoeff = ((float) (8.2 + 33)) / 8.2 * 2;
/** /**
* This board was avoiding PE0 & PE1 mosfets altogether * This board was avoiding PE0 & PE1 mosfets altogether
@ -321,8 +321,8 @@ void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
} }
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiata1994_s(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setMiata1994_common(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1994_common(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2; engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2;
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
@ -330,7 +330,7 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso
engineConfiguration->afr.hwChannel = EFI_ADC_3; engineConfiguration->afr.hwChannel = EFI_ADC_3;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
/** /**
* This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue * This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue
@ -348,7 +348,7 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->acIdleRpmBump = 200; engineConfiguration->acIdleRpmBump = 200;
//engineConfiguration->idleMode != IM_AUTO; //engineConfiguration->idleMode != IM_AUTO;
setTargetRpmCurve(800 PASS_ENGINE_PARAMETER_SUFFIX); setTargetRpmCurve(800 PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->tpsMax = 86; engineConfiguration->tpsMax = 86;
@ -365,8 +365,8 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/** /**
* Tom tomiata, Frankenstein board * Tom tomiata, Frankenstein board
*/ */
void setMiata1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
commonMiataNa(PASS_ENGINE_PARAMETER_SIGNATURE); commonMiataNa(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->specs.displacement = 1.839; engineConfiguration->specs.displacement = 1.839;
copyFuelTable(miataNA8_maf_fuel_table, config->fuelTable); copyFuelTable(miataNA8_maf_fuel_table, config->fuelTable);

View File

@ -12,12 +12,12 @@
#ifndef MAZDA_MIATA_H_ #ifndef MAZDA_MIATA_H_
#define MAZDA_MIATA_H_ #define MAZDA_MIATA_H_
#include "engine.h" #include "engine_configuration.h"
void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration); void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration);
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiata1990(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiata1994_d(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiata1994_s(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMiata1996(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* MAZDA_MIATA_H_ */ #endif /* MAZDA_MIATA_H_ */

View File

@ -14,7 +14,7 @@
#include "thermistors.h" #include "thermistors.h"
#include "mazda_miata_1_6.h" #include "mazda_miata_1_6.h"
EXTERN_ENGINE; EXTERN_CONFIG;
// todo: // todo:
// extern const float ve16RpmBins[FUEL_RPM_COUNT]; // extern const float ve16RpmBins[FUEL_RPM_COUNT];
@ -92,7 +92,7 @@ static const fuel_table_t miataNA6_maf_fuel_table = {
{/* 15 4.400 *//* 0 800.0*/7.000, /* 1 1213.33*/7.000, /* 2 1626.6699*/7.000, /* 3 2040.0*/7.000, /* 4 2453.3298*/7.000, /* 5 2866.67*/7.000, /* 6 3280.0*/7.000, /* 7 3693.3298*/7.000, /* 8 4106.67*/6.000, /* 9 4520.0*/6.000, /* 10 4933.33*/6.000, /* 11 5346.67*/6.000, /* 12 5760.0*/6.000, /* 13 6173.33*/6.000, /* 14 6586.67*/6.000, /* 15 7000.0*/6.000, }, {/* 15 4.400 *//* 0 800.0*/7.000, /* 1 1213.33*/7.000, /* 2 1626.6699*/7.000, /* 3 2040.0*/7.000, /* 4 2453.3298*/7.000, /* 5 2866.67*/7.000, /* 6 3280.0*/7.000, /* 7 3693.3298*/7.000, /* 8 4106.67*/6.000, /* 9 4520.0*/6.000, /* 10 4933.33*/6.000, /* 11 5346.67*/6.000, /* 12 5760.0*/6.000, /* 13 6173.33*/6.000, /* 14 6586.67*/6.000, /* 15 7000.0*/6.000, },
}; };
void miataNAcommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA; engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.firingOrder = FO_1_3_4_2; engineConfiguration->specs.firingOrder = FO_1_3_4_2;
@ -115,8 +115,8 @@ void miataNAcommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->ignitionMode = IM_WASTED_SPARK; engineConfiguration->ignitionMode = IM_WASTED_SPARK;
} }
void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiataNA6_MAP_Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
boardConfiguration->isHip9011Enabled = false; boardConfiguration->isHip9011Enabled = false;
boardConfiguration->isSdCardEnabled = false; boardConfiguration->isSdCardEnabled = false;
@ -232,7 +232,7 @@ void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#if EFI_FSIO #if EFI_FSIO
// todo: convert // todo: convert
setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX); setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */ #endif /* EFI_FSIO */
boardConfiguration->injectionPins[0] = GPIOD_3; // #1&3 pin 3U boardConfiguration->injectionPins[0] = GPIOD_3; // #1&3 pin 3U
@ -253,12 +253,12 @@ void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// green wire from 1Q/W17 to bottom of W46 // green wire from 1Q/W17 to bottom of W46
engineConfiguration->acSwitchAdc = EFI_ADC_6; // PA6 engineConfiguration->acSwitchAdc = EFI_ADC_6; // PA6
miataNAcommon(PASS_ENGINE_PARAMETER_SIGNATURE); miataNAcommon(PASS_CONFIG_PARAMETER_SIGNATURE);
copyFuelTable(miataNA6_maf_fuel_table, config->fuelTable); copyFuelTable(miataNA6_maf_fuel_table, config->fuelTable);
} }
void setMiataNA6_VAF_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMiataNA6_VAF_Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setMiataNA6_MAP_Configuration(PASS_ENGINE_PARAMETER_SIGNATURE); setMiataNA6_MAP_Configuration(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF; engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
/** /**

View File

@ -8,9 +8,10 @@
#ifndef CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ #ifndef CONFIG_ENGINES_MAZDA_MIATA_1_6_H_
#define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ #define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_
#include "engine.h" #include "engine_configuration.h"
void setMiataNA6_VAF_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiataNA6_VAF_Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void miataNAcommon(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMiataNA6_MAP_Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */ #endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */

View File

@ -5,7 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2017 * @author Andrey Belomutskiy, (c) 2012-2017
*/ */
#include "engine.h" #include "engine_configuration.h"
//const float ve16RpmBins[FUEL_RPM_COUNT] = { //const float ve16RpmBins[FUEL_RPM_COUNT] = {
//650.0,1100.0,1550.0,2000.0, //650.0,1100.0,1550.0,2000.0,

View File

@ -13,13 +13,13 @@
#include "custom_engine.h" #include "custom_engine.h"
#include "mazda_miata_1_6.h" #include "mazda_miata_1_6.h"
EXTERN_ENGINE; EXTERN_CONFIG;
/** /**
* See also setMiataNA_1_6_Configuration * See also setMiataNA_1_6_Configuration
*/ */
void setMazdaMiataNA8Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiataNA8Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
// blue jumper wire to W45 bottom jumper, not OEM // blue jumper wire to W45 bottom jumper, not OEM
engineConfiguration->map.sensor.hwChannel = EFI_ADC_7; engineConfiguration->map.sensor.hwChannel = EFI_ADC_7;
@ -43,7 +43,7 @@ void setMazdaMiataNA8Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->injectionMode = IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SEQUENTIAL;
miataNAcommon(PASS_ENGINE_PARAMETER_SIGNATURE); miataNAcommon(PASS_CONFIG_PARAMETER_SIGNATURE);
} }

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ #ifndef CONFIG_ENGINES_MAZDA_MIATA_NA8_H_
#define CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ #define CONFIG_ENGINES_MAZDA_MIATA_NA8_H_
#include "engine.h" #include "engine_configuration.h"
void setMazdaMiataNA8Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiataNA8Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ */ #endif /* CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ */

View File

@ -15,9 +15,9 @@
#include "mazda_miata_nb.h" #include "mazda_miata_nb.h"
#include "thermistors.h" #include "thermistors.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// set_rpm_hard_limit 3000 // set_rpm_hard_limit 3000
engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now
@ -88,5 +88,5 @@ void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->fsio_setting[0] = 5000; boardConfiguration->fsio_setting[0] = 5000;
// (self and (rpm > 4800)) OR (rpm > 5000) // (self and (rpm > 4800)) OR (rpm > 5000)
// set_rpn_expression 1 "self rpm 4800 > & rpm 5000 > OR" // set_rpn_expression 1 "self rpm 4800 > & rpm 5000 > OR"
// setFsioExt(0, GPIOE_3, "self rpm 4800 > & rpm 5000 > OR", 150 PASS_ENGINE_PARAMETER_SUFFIX); // setFsioExt(0, GPIOE_3, "self rpm 4800 > & rpm 5000 > OR", 150 PASS_CONFIG_PARAMETER_SUFFIX);
} }

View File

@ -8,8 +8,8 @@
#ifndef MAZDA_MIATA_NB1_H_ #ifndef MAZDA_MIATA_NB1_H_
#define MAZDA_MIATA_NB1_H_ #define MAZDA_MIATA_NB1_H_
#include "engine.h" #include "engine_configuration.h"
void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* MAZDA_MIATA_NB1_H_ */ #endif /* MAZDA_MIATA_NB1_H_ */

View File

@ -40,7 +40,7 @@
#include "fsio_impl.h" #include "fsio_impl.h"
#include "ego.h" #include "ego.h"
EXTERN_ENGINE; EXTERN_CONFIG;
static const float injectorLagBins[VBAT_INJECTOR_CURVE_SIZE] = { static const float injectorLagBins[VBAT_INJECTOR_CURVE_SIZE] = {
6.0, 8.0, 10.0, 11.0, 6.0, 8.0, 10.0, 11.0,
@ -217,7 +217,7 @@ static const ignition_table_t mapBased18vvtTimingTable = {
{/* 15 250.000 *//* 0 700.0*/1.100, /* 1 850.0*/1.400, /* 2 943.0*/1.600, /* 3 1112.0*/2.000, /* 4 1310.0*/2.500, /* 5 1545.0*/3.000, /* 6 1821.0*/3.700, /* 7 2146.0*/4.400, /* 8 2530.0*/5.400, /* 9 2982.0*/6.600, /* 10 3515.0*/7.600, /* 11 4144.0*/9.000, /* 12 4884.0*/10.500, /* 13 5757.0*/12.000, /* 14 6787.0*/13.400, /* 15 8000.0*/14.900, }, {/* 15 250.000 *//* 0 700.0*/1.100, /* 1 850.0*/1.400, /* 2 943.0*/1.600, /* 3 1112.0*/2.000, /* 4 1310.0*/2.500, /* 5 1545.0*/3.000, /* 6 1821.0*/3.700, /* 7 2146.0*/4.400, /* 8 2530.0*/5.400, /* 9 2982.0*/6.600, /* 10 3515.0*/7.600, /* 11 4144.0*/9.000, /* 12 4884.0*/10.500, /* 13 5757.0*/12.000, /* 14 6787.0*/13.400, /* 15 8000.0*/14.900, },
}; };
void setMazdaMiataNbTpsTps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiataNbTpsTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
memcpy(config->tpsTpsAccelFromRpmBins, tpsTspSame, sizeof(tpsTspSame)); memcpy(config->tpsTpsAccelFromRpmBins, tpsTspSame, sizeof(tpsTspSame));
memcpy(config->tpsTpsAccelFromRpmBins, tpsTspSame, sizeof(tpsTspSame)); memcpy(config->tpsTpsAccelFromRpmBins, tpsTspSame, sizeof(tpsTspSame));
// todo: there should be a better way? // todo: there should be a better way?
@ -228,13 +228,13 @@ void setMazdaMiataNbTpsTps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
} }
void setMazdaMiataNbInjectorLag(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
memcpy(engineConfiguration->injector.battLagCorr, injectorLagCorrection, sizeof(injectorLagCorrection)); memcpy(engineConfiguration->injector.battLagCorr, injectorLagCorrection, sizeof(injectorLagCorrection));
memcpy(engineConfiguration->injector.battLagCorrBins, injectorLagBins, sizeof(injectorLagBins)); memcpy(engineConfiguration->injector.battLagCorrBins, injectorLagBins, sizeof(injectorLagBins));
} }
void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->trigger.type = TT_MIATA_VVT; engineConfiguration->trigger.type = TT_MIATA_VVT;
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
@ -287,7 +287,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// * set_fsio_setting 1 0.55 // * set_fsio_setting 1 0.55
// */ // */
boardConfiguration->fsio_setting[0] = 0.0; boardConfiguration->fsio_setting[0] = 0.0;
// setFsioExt(0, GPIOE_3, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX); // setFsioExt(0, GPIOE_3, "0 fsio_setting", 400 PASS_CONFIG_PARAMETER_SUFFIX);
@ -338,10 +338,10 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
} }
setMazdaMiataNbTpsTps(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNbTpsTps(PASS_CONFIG_PARAMETER_SIGNATURE);
setMazdaMiataNbInjectorLag(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNbInjectorLag(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4) engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4) engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)
@ -395,7 +395,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->afr.hwChannel = EFI_ADC_4; engineConfiguration->afr.hwChannel = EFI_ADC_4;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
// //
/** /**
@ -410,7 +410,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->fsio_setting[2] = 105; // #3 CLT threshold boardConfiguration->fsio_setting[2] = 105; // #3 CLT threshold
boardConfiguration->fsio_setting[3] = 12.0; // #4 voltage threshold boardConfiguration->fsio_setting[3] = 12.0; // #4 voltage threshold
// setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX); // setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT PASS_CONFIG_PARAMETER_SUFFIX);
// enable auto_idle // enable auto_idle
// enable verbose_idle // enable verbose_idle
@ -431,8 +431,8 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->idleRpmPid.periodMs = 10; engineConfiguration->idleRpmPid.periodMs = 10;
} }
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setMazdaMiata2003EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
// todo: there should be a better way? // todo: there should be a better way?
for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) { for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) {
@ -457,7 +457,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIG
engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4 engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4
setEgoSensor(ES_14Point7_Free PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
// set cranking_fuel 9 // set cranking_fuel 9
@ -482,8 +482,8 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIG
* board #70 - closer to default miata harness * board #70 - closer to default miata harness
* *
*/ */
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setMazdaMiata2003EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
boardConfiguration->ignitionPins[2] = GPIOC_7; boardConfiguration->ignitionPins[2] = GPIOC_7;

View File

@ -10,13 +10,13 @@
#ifndef CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ #ifndef CONFIG_ENGINES_MAZDA_MIATA_VVT_H_
#define CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ #define CONFIG_ENGINES_MAZDA_MIATA_VVT_H_
#include "engine.h" #include "engine_configuration.h"
void setMazdaMiataNbInjectorLag(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMazdaMiataNbTpsTps(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiataNbTpsTps(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ */ #endif /* CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ */

View File

@ -14,9 +14,9 @@
#include "mitsubishi.h" #include "mitsubishi.h"
#include "allsensors.h" #include "allsensors.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineType = MITSU_4G93; engineConfiguration->engineType = MITSU_4G93;
engineConfiguration->trigger.type = TT_MITSUBISHI; // same trigger as 4G63? engineConfiguration->trigger.type = TT_MITSUBISHI; // same trigger as 4G63?
@ -83,10 +83,10 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->HD44780width = 20; engineConfiguration->HD44780width = 20;
engineConfiguration->HD44780height = 4; engineConfiguration->HD44780height = 4;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
#if EFI_FSIO #if EFI_FSIO
setFsioExt(0, GPIOC_9, RPM_ABOVE_6000_SOLENOID_80_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX); setFsioExt(0, GPIOC_9, RPM_ABOVE_6000_SOLENOID_80_DUTY, 200 PASS_CONFIG_PARAMETER_SUFFIX);
setFsioExt(1, GPIOC_7, RPM_ABOVE_2000_SOLENOID_50_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX); setFsioExt(1, GPIOC_7, RPM_ABOVE_2000_SOLENOID_50_DUTY, 200 PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */ #endif /* EFI_FSIO */
} }

View File

@ -7,8 +7,8 @@
#ifndef MITSUBISHI_H_ #ifndef MITSUBISHI_H_
#define MITSUBISHI_H_ #define MITSUBISHI_H_
#include "engine.h" #include "engine_configuration.h"
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* MITSUBISHI_H_ */ #endif /* MITSUBISHI_H_ */

View File

@ -9,7 +9,7 @@
#include "prometheus.h" #include "prometheus.h"
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setPrometheusDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
} }

View File

@ -8,7 +8,7 @@
#ifndef CONFIG_ENGINES_PROMETHEUS_H_ #ifndef CONFIG_ENGINES_PROMETHEUS_H_
#define CONFIG_ENGINES_PROMETHEUS_H_ #define CONFIG_ENGINES_PROMETHEUS_H_
#include "engine.h" #include "engine_configuration.h"
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setPrometheusDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_PROMETHEUS_H_ */ #endif /* CONFIG_ENGINES_PROMETHEUS_H_ */

View File

@ -27,9 +27,9 @@ void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration) {
boardConfiguration->HD44780_db7 = GPIOB_13; boardConfiguration->HD44780_db7 = GPIOB_13;
} }
EXTERN_ENGINE; EXTERN_CONFIG;
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setRoverv8(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// set trigger_type 9 // set trigger_type 9
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1; engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;

View File

@ -7,9 +7,9 @@
#ifndef ROVER_V8_H_ #ifndef ROVER_V8_H_
#define ROVER_V8_H_ #define ROVER_V8_H_
#include "engine.h" #include "engine_configuration.h"
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration); void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration);
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setRoverv8(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* ROVER_V8_H_ */ #endif /* ROVER_V8_H_ */

View File

@ -12,9 +12,9 @@
#include "allsensors.h" #include "allsensors.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->specs.displacement = 0.1; // 100cc engineConfiguration->specs.displacement = 0.1; // 100cc
engineConfiguration->specs.cylindersCount = 1; engineConfiguration->specs.cylindersCount = 1;
@ -25,7 +25,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// set injection_offset 0 // set injection_offset 0
engineConfiguration->extraInjectionOffset = 0; engineConfiguration->extraInjectionOffset = 0;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
/** /**
* 50/2 trigger * 50/2 trigger

View File

@ -7,8 +7,8 @@
#ifndef CONFIG_ENGINES_SACHS_H_ #ifndef CONFIG_ENGINES_SACHS_H_
#define CONFIG_ENGINES_SACHS_H_ #define CONFIG_ENGINES_SACHS_H_
#include "engine.h" #include "engine_configuration.h"
void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_SACHS_H_ */ #endif /* CONFIG_ENGINES_SACHS_H_ */

View File

@ -11,9 +11,9 @@
#include "subaru.h" #include "subaru.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setFrankenso_01_LCD(boardConfiguration); setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration); setFrankenso0_1_joystick(engineConfiguration);
@ -39,6 +39,6 @@ void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
* Subaru WRX <=1996 Turbo. * Subaru WRX <=1996 Turbo.
*/ */
void setSubaruEJ20GDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_SUBARU_7_6; engineConfiguration->trigger.type = TT_SUBARU_7_6;
} }

View File

@ -7,9 +7,9 @@
#ifndef SUBARU_H_ #ifndef SUBARU_H_
#define SUBARU_H_ #define SUBARU_H_
#include "engine.h" #include "engine_configuration.h"
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setSubaruEJ20GDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* SUBARU_H_ */ #endif /* SUBARU_H_ */

View File

@ -9,9 +9,9 @@
#include "suzuki_vitara.h" #include "suzuki_vitara.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setSuzukiVitara(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_MAZDA_SOHC_4; engineConfiguration->trigger.type = TT_MAZDA_SOHC_4;
engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 1.590; engineConfiguration->specs.displacement = 1.590;

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_SUZUKI_VITARA_H_ #ifndef CONFIG_ENGINES_SUZUKI_VITARA_H_
#define CONFIG_ENGINES_SUZUKI_VITARA_H_ #define CONFIG_ENGINES_SUZUKI_VITARA_H_
#include "engine.h" #include "engine_configuration.h"
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setSuzukiVitara(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_SUZUKI_VITARA_H_ */ #endif /* CONFIG_ENGINES_SUZUKI_VITARA_H_ */

View File

@ -11,13 +11,13 @@
* @author Andrey Belomutskiy, (c) 2012-2018 * @author Andrey Belomutskiy, (c) 2012-2018
*/ */
#include "engine.h" #include "engine_configuration.h"
#include "test_engine.h" #include "test_engine.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE; engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
@ -32,10 +32,10 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->mafAdcChannel = EFI_ADC_1; engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE; engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER_SUFFIX); setWholeIatCorrTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->ignitionMode = IM_ONE_COIL; engineConfiguration->ignitionMode = IM_ONE_COIL;
setConstantDwell(3 PASS_ENGINE_PARAMETER_SUFFIX); // 50% duty cycle @ 5000 rpm setConstantDwell(3 PASS_CONFIG_PARAMETER_SUFFIX); // 50% duty cycle @ 5000 rpm
board_configuration_s *bc = &engineConfiguration->bc; board_configuration_s *bc = &engineConfiguration->bc;
bc->malfunctionIndicatorPin = GPIO_UNASSIGNED; bc->malfunctionIndicatorPin = GPIO_UNASSIGNED;
@ -53,7 +53,7 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED; boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED;
} }
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL; engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
@ -74,8 +74,8 @@ void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setTestEngineIssue366both(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setTestEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->useOnlyRisingEdgeForTrigger = false; engineConfiguration->useOnlyRisingEdgeForTrigger = false;
@ -86,8 +86,8 @@ void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
void setTestEngineIssue366rise(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setTestEngineIssue366rise(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setTestEngineIssue366both(PASS_ENGINE_PARAMETER_SIGNATURE); setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->useOnlyRisingEdgeForTrigger = true; engineConfiguration->useOnlyRisingEdgeForTrigger = true;

View File

@ -9,10 +9,10 @@
#include "engine_configuration.h" #include "engine_configuration.h"
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setTestEngineIssue366both(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setTestEngineIssue366rise(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setTestEngineIssue366rise(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* TEST_ENGINE_H_ */ #endif /* TEST_ENGINE_H_ */

View File

@ -21,10 +21,10 @@
#include "custom_engine.h" #include "custom_engine.h"
#include "thermistors.h" #include "thermistors.h"
EXTERN_ENGINE; EXTERN_CONFIG;
static void common2jz(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); // default pinout setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); // default pinout
engineConfiguration->specs.displacement = 3.0; engineConfiguration->specs.displacement = 3.0;
engineConfiguration->specs.cylindersCount = 6; engineConfiguration->specs.cylindersCount = 6;
@ -67,8 +67,8 @@ static void common2jz(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE); common2jz(PASS_CONFIG_PARAMETER_SIGNATURE);
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_2JZ_1_12; engineConfiguration->trigger.type = TT_2JZ_1_12;
@ -95,8 +95,8 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE); common2jz(PASS_CONFIG_PARAMETER_SIGNATURE);
boardConfiguration->isSdCardEnabled = true; boardConfiguration->isSdCardEnabled = true;

View File

@ -8,9 +8,9 @@
#ifndef CONFIG_ENGINES_TOYOTA_JZS147_H_ #ifndef CONFIG_ENGINES_TOYOTA_JZS147_H_
#define CONFIG_ENGINES_TOYOTA_JZS147_H_ #define CONFIG_ENGINES_TOYOTA_JZS147_H_
#include "engine.h" #include "engine_configuration.h"
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_TOYOTA_JZS147_H_ */ #endif /* CONFIG_ENGINES_TOYOTA_JZS147_H_ */

View File

@ -13,10 +13,10 @@
#include "ego.h" #include "ego.h"
#include "engine_math.h" #include "engine_math.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
setWholeTimingTable_d(20 PASS_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(20 PASS_CONFIG_PARAMETER_SUFFIX);
// set cranking_timing_angle 10 // set cranking_timing_angle 10
@ -56,7 +56,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
float mapRange = 110; float mapRange = 110;
setEgoSensor(ES_PLX PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_PLX PASS_CONFIG_PARAMETER_SUFFIX);
setFuelTablesLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX); setFuelTablesLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
setTimingLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX); setTimingLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);

View File

@ -8,8 +8,8 @@
#ifndef CONFIG_ENGINES_VW_H_ #ifndef CONFIG_ENGINES_VW_H_
#define CONFIG_ENGINES_VW_H_ #define CONFIG_ENGINES_VW_H_
#include "engine.h" #include "engine_configuration.h"
void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* CONFIG_ENGINES_VW_H_ */ #endif /* CONFIG_ENGINES_VW_H_ */

View File

@ -12,10 +12,10 @@
#include "engine_template.h" #include "engine_template.h"
#include "custom_engine.h" #include "custom_engine.h"
EXTERN_ENGINE; EXTERN_CONFIG;
void setZil130(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void setZil130(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->specs.cylindersCount = 8; engineConfiguration->specs.cylindersCount = 8;

View File

@ -8,7 +8,8 @@
#ifndef ZIL130_H_ #ifndef ZIL130_H_
#define ZIL130_H_ #define ZIL130_H_
#include "engine.h" #include "engine_configuration.h"
void setZil130(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setZil130(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* ZIL130_H_ */ #endif /* ZIL130_H_ */

View File

@ -204,7 +204,7 @@ void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/** /**
* @brief Sets the same dwell time across the whole getRpm() range * @brief Sets the same dwell time across the whole getRpm() range
*/ */
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX) { void setConstantDwell(floatms_t dwellMs DECLARE_CONFIG_PARAMETER_SUFFIX) {
for (int i = 0; i < DWELL_CURVE_SIZE; i++) { for (int i = 0; i < DWELL_CURVE_SIZE; i++) {
engineConfiguration->sparkDwellRpmBins[i] = 1000 * i; engineConfiguration->sparkDwellRpmBins[i] = 1000 * i;
} }
@ -235,7 +235,7 @@ void setWholeFuelMap(float value DECLARE_CONFIG_PARAMETER_SUFFIX) {
setMap(config->fuelTable, value); setMap(config->fuelTable, value);
} }
void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_SUFFIX) { void setWholeIgnitionIatCorr(float value DECLARE_CONFIG_PARAMETER_SUFFIX) {
setMap(config->ignitionIatCorrTable, value); setMap(config->ignitionIatCorrTable, value);
} }
@ -253,7 +253,7 @@ void setTimingMap(ignition_table_t map, float value) {
} }
} }
void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_SUFFIX) { void setWholeIatCorrTimingTable(float value DECLARE_CONFIG_PARAMETER_SUFFIX) {
setTimingMap(config->ignitionIatCorrTable, value); setTimingMap(config->ignitionIatCorrTable, value);
} }
@ -667,7 +667,7 @@ static void setCanDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/** /**
* see also setDefaultIdleSpeedTarget() * see also setDefaultIdleSpeedTarget()
*/ */
void setTargetRpmCurve(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { void setTargetRpmCurve(int rpm DECLARE_CONFIG_PARAMETER_SUFFIX) {
setLinearCurve(engineConfiguration->cltIdleRpmBins, CLT_CURVE_SIZE, -40, 90, 10); setLinearCurve(engineConfiguration->cltIdleRpmBins, CLT_CURVE_SIZE, -40, 90, 10);
setLinearCurve(engineConfiguration->cltIdleRpm, CLT_CURVE_SIZE, rpm, rpm, 10); setLinearCurve(engineConfiguration->cltIdleRpm, CLT_CURVE_SIZE, rpm, rpm, 10);
} }
@ -758,13 +758,13 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setDefaultFuelCutParameters(PASS_ENGINE_PARAMETER_SIGNATURE); setDefaultFuelCutParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
setMazdaMiataNbTpsTps(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNbTpsTps(PASS_CONFIG_PARAMETER_SIGNATURE);
/** /**
* 4ms is global default dwell for the whole RPM range * 4ms is global default dwell for the whole RPM range
* if you only have one coil and many cylinders or high RPM you would need lower value at higher RPM * if you only have one coil and many cylinders or high RPM you would need lower value at higher RPM
*/ */
setConstantDwell(4 PASS_ENGINE_PARAMETER_SUFFIX); setConstantDwell(4 PASS_CONFIG_PARAMETER_SUFFIX);
/** /**
* Use angle-based duration during cranking * Use angle-based duration during cranking
* this is equivalent to 'disable cranking_constant_dwell' console command * this is equivalent to 'disable cranking_constant_dwell' console command
@ -965,7 +965,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->cylinderBore = 87.5; engineConfiguration->cylinderBore = 87.5;
setEgoSensor(ES_14Point7_Free PASS_ENGINE_PARAMETER_SUFFIX); setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
engineConfiguration->globalFuelCorrection = 1; engineConfiguration->globalFuelCorrection = 1;
engineConfiguration->adcVcc = 3.0; engineConfiguration->adcVcc = 3.0;
@ -1065,7 +1065,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->fsio_setting[0] = 5000; boardConfiguration->fsio_setting[0] = 5000;
// simple warning light as default configuration // simple warning light as default configuration
// set_fsio_expression 1 "rpm > fsio_setting(1)" // set_fsio_expression 1 "rpm > fsio_setting(1)"
setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_ENGINE_PARAMETER_SUFFIX); setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */ #endif /* EFI_FSIO */
} }
@ -1171,13 +1171,13 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
*/ */
switch (engineType) { switch (engineType) {
case CUSTOM_ENGINE: case CUSTOM_ENGINE:
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCustomEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MINIMAL_PINS: case MINIMAL_PINS:
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here // all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
break; break;
case ACURA_RSX: case ACURA_RSX:
setAcuraRSX(engineConfiguration); setAcuraRSX(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#if EFI_SUPPORT_DODGE_NEON #if EFI_SUPPORT_DODGE_NEON
case DODGE_NEON_1995: case DODGE_NEON_1995:
@ -1190,13 +1190,13 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
setDodgeNeonNGCEngineConfigurationCrankBased(PASS_CONFIG_PARAMETER_SIGNATURE); setDodgeNeonNGCEngineConfigurationCrankBased(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case LADA_KALINA: case LADA_KALINA:
setLadaKalina(PASS_ENGINE_PARAMETER_SIGNATURE); setLadaKalina(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#endif /* EFI_SUPPORT_DODGE_NEON */ #endif /* EFI_SUPPORT_DODGE_NEON */
#if EFI_SUPPORT_FORD_ASPIRE #if EFI_SUPPORT_FORD_ASPIRE
case FORD_ASPIRE_1996: case FORD_ASPIRE_1996:
setFordAspireEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setFordAspireEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#endif /* EFI_SUPPORT_FORD_ASPIRE */ #endif /* EFI_SUPPORT_FORD_ASPIRE */
#if EFI_SUPPORT_FORD_FIESTA #if EFI_SUPPORT_FORD_FIESTA
@ -1210,121 +1210,121 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
break; break;
#endif #endif
case HONDA_ACCORD_CD: case HONDA_ACCORD_CD:
setHondaAccordConfigurationThreeWires(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationThreeWires(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case ZIL_130: case ZIL_130:
setZil130(PASS_ENGINE_PARAMETER_SIGNATURE); setZil130(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_NA6_MAP: case MIATA_NA6_MAP:
setMiataNA6_MAP_Configuration(PASS_ENGINE_PARAMETER_SIGNATURE); setMiataNA6_MAP_Configuration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_NA6_VAF: case MIATA_NA6_VAF:
setMiataNA6_VAF_Configuration(PASS_ENGINE_PARAMETER_SIGNATURE); setMiataNA6_VAF_Configuration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case ETB_BENCH_ENGINE: case ETB_BENCH_ENGINE:
setEtbTestConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setEtbTestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TLE8888_BENCH_ENGINE: case TLE8888_BENCH_ENGINE:
setTle8888TestConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setTle8888TestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_MIATA_NA8: case MAZDA_MIATA_NA8:
setMazdaMiataNA8Configuration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNA8Configuration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TEST_CIVIC_4_0_BOTH: case TEST_CIVIC_4_0_BOTH:
setHondaCivic4_0_both(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaCivic4_0_both(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TEST_CIVIC_4_0_RISE: case TEST_CIVIC_4_0_RISE:
setHondaCivic4_0_rise(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaCivic4_0_rise(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case HONDA_ACCORD_CD_TWO_WIRES: case HONDA_ACCORD_CD_TWO_WIRES:
setHondaAccordConfiguration1_24(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfiguration1_24(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case HONDA_ACCORD_1_24_SHIFTED: case HONDA_ACCORD_1_24_SHIFTED:
setHondaAccordConfiguration1_24_shifted(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfiguration1_24_shifted(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case FRANKENSO_QA_ENGINE: case FRANKENSO_QA_ENGINE:
setFrankensoBoardTestConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setFrankensoBoardTestConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case HONDA_ACCORD_CD_DIP: case HONDA_ACCORD_CD_DIP:
setHondaAccordConfigurationDip(PASS_ENGINE_PARAMETER_SIGNATURE); setHondaAccordConfigurationDip(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MITSU_4G93: case MITSU_4G93:
setMitsubishiConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMitsubishiConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#if EFI_SUPPORT_1995_FORD_INLINE_6 #if EFI_SUPPORT_1995_FORD_INLINE_6
case FORD_INLINE_6_1995: case FORD_INLINE_6_1995:
setFordInline6(PASS_ENGINE_PARAMETER_SIGNATURE); setFordInline6(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */ #endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
case GY6_139QMB: case GY6_139QMB:
setGy6139qmbDefaultEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setGy6139qmbDefaultEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case HONDA_600: case HONDA_600:
setHonda600(PASS_ENGINE_PARAMETER_SIGNATURE); setHonda600(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_MIATA_NB1: case MAZDA_MIATA_NB1:
setMazdaMiataNb1EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiataNb1EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_323: case MAZDA_323:
setMazda323EngineConfiguration(engineConfiguration); setMazda323EngineConfiguration(engineConfiguration);
break; break;
case MAZDA_626: case MAZDA_626:
setMazda626EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazda626EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case SATURN_ION_2004: case SATURN_ION_2004:
setSaturnIonEngineConfiguration(engineConfiguration); setSaturnIonEngineConfiguration(engineConfiguration);
break; break;
case SUZUKI_VITARA: case SUZUKI_VITARA:
setSuzukiVitara(PASS_ENGINE_PARAMETER_SIGNATURE); setSuzukiVitara(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MINI_COOPER_R50: case MINI_COOPER_R50:
setMiniCooperR50(engineConfiguration); setMiniCooperR50(engineConfiguration);
break; break;
case FORD_ESCORT_GT: case FORD_ESCORT_GT:
setFordEscortGt(PASS_ENGINE_PARAMETER_SIGNATURE); setFordEscortGt(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_1990: case MIATA_1990:
setMiata1990(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1990(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_1994_DEVIATOR: case MIATA_1994_DEVIATOR:
setMiata1994_d(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1994_d(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_1994_SPAGS: case MIATA_1994_SPAGS:
setMiata1994_s(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1994_s(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MIATA_1996: case MIATA_1996:
setMiata1996(PASS_ENGINE_PARAMETER_SIGNATURE); setMiata1996(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case CITROEN_TU3JP: case CITROEN_TU3JP:
setCitroenBerlingoTU3JPConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setCitroenBerlingoTU3JPConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case ROVER_V8: case ROVER_V8:
setRoverv8(PASS_ENGINE_PARAMETER_SIGNATURE); setRoverv8(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case SUBARU_2003_WRX: case SUBARU_2003_WRX:
setSubaru2003Wrx(PASS_ENGINE_PARAMETER_SIGNATURE); setSubaru2003Wrx(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case BMW_E34: case BMW_E34:
setBmwE34(PASS_ENGINE_PARAMETER_SIGNATURE); setBmwE34(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case GM_2_2: case GM_2_2:
setGm2_2(PASS_ENGINE_PARAMETER_SIGNATURE); setGm2_2(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case DODGE_RAM: case DODGE_RAM:
setDodgeRam1996(PASS_ENGINE_PARAMETER_SIGNATURE); setDodgeRam1996(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case DODGE_STRATUS: case DODGE_STRATUS:
setDodgeStratus(PASS_ENGINE_PARAMETER_SIGNATURE); setDodgeStratus(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case VW_ABA: case VW_ABA:
setVwAba(PASS_ENGINE_PARAMETER_SIGNATURE); setVwAba(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
case TEST_ISSUE_366_BOTH: case TEST_ISSUE_366_BOTH:
setTestEngineIssue366both(PASS_ENGINE_PARAMETER_SIGNATURE); setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TEST_ISSUE_366_RISE: case TEST_ISSUE_366_RISE:
setTestEngineIssue366rise(PASS_ENGINE_PARAMETER_SIGNATURE); setTestEngineIssue366rise(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
#else #else
case TEST_ISSUE_366_BOTH: case TEST_ISSUE_366_BOTH:
@ -1332,46 +1332,46 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
#endif #endif
case TEST_ENGINE: case TEST_ENGINE:
setTestEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_MIATA_2003: case MAZDA_MIATA_2003:
setMazdaMiata2003EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_MIATA_2003_NA_RAIL: case MAZDA_MIATA_2003_NA_RAIL:
setMazdaMiata2003EngineConfigurationNaFuelRail(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfigurationNaFuelRail(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MAZDA_MIATA_2003_BOARD_TEST: case MAZDA_MIATA_2003_BOARD_TEST:
setMazdaMiata2003EngineConfigurationBoardTest(PASS_ENGINE_PARAMETER_SIGNATURE); setMazdaMiata2003EngineConfigurationBoardTest(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case PROMETHEUS_DEFAULTS: case PROMETHEUS_DEFAULTS:
setPrometheusDefaults(PASS_ENGINE_PARAMETER_SIGNATURE); setPrometheusDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case SUBARUEJ20G_DEFAULTS: case SUBARUEJ20G_DEFAULTS:
setSubaruEJ20GDefaults(PASS_ENGINE_PARAMETER_SIGNATURE); setSubaruEJ20GDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TEST_ENGINE_VVT: case TEST_ENGINE_VVT:
setTestVVTEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setTestVVTEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case SACHS: case SACHS:
setSachs(PASS_ENGINE_PARAMETER_SIGNATURE); setSachs(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case DAIHATSU: case DAIHATSU:
setDaihatsu(PASS_ENGINE_PARAMETER_SIGNATURE); setDaihatsu(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case CAMARO_4: case CAMARO_4:
setCamaro4(PASS_ENGINE_PARAMETER_SIGNATURE); setCamaro4(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case CHEVY_C20_1973: case CHEVY_C20_1973:
set1973c20(PASS_ENGINE_PARAMETER_SIGNATURE); set1973c20(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TOYOTA_2JZ_GTE_VVTi: case TOYOTA_2JZ_GTE_VVTi:
setToyota_2jz_vics(PASS_ENGINE_PARAMETER_SIGNATURE); setToyota_2jz_vics(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case TOYOTA_JZS147: case TOYOTA_JZS147:
setToyota_jzs147EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setToyota_jzs147EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case GEO_STORM: case GEO_STORM:
setGeoStormConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); setGeoStormConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
default: default:

View File

@ -49,8 +49,8 @@ typedef struct {
} persistent_config_container_s; } persistent_config_container_s;
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration); void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setDefaultConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setTargetRpmCurve(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); void setTargetRpmCurve(int rpm DECLARE_CONFIG_PARAMETER_SUFFIX);
int getTargetRpmForIdleCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE); int getTargetRpmForIdleCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setAfrMap(afr_table_t table, float value); void setAfrMap(afr_table_t table, float value);
/** /**
@ -58,12 +58,12 @@ void setAfrMap(afr_table_t table, float value);
*/ */
void setMap(fuel_table_t table, float value); void setMap(fuel_table_t table, float value);
void setWholeFuelMap(float value DECLARE_CONFIG_PARAMETER_SUFFIX); void setWholeFuelMap(float value DECLARE_CONFIG_PARAMETER_SUFFIX);
void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_SUFFIX); void setWholeIgnitionIatCorr(float value DECLARE_CONFIG_PARAMETER_SUFFIX);
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_CONFIG_PARAMETER_SUFFIX); void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_CONFIG_PARAMETER_SUFFIX);
void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_SUFFIX); void setWholeIatCorrTimingTable(float value DECLARE_CONFIG_PARAMETER_SUFFIX);
void setWholeTimingTable_d(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX); void setWholeTimingTable_d(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX);
#define setWholeTimingTable(x) setWholeTimingTable_d(x PASS_CONFIG_PARAMETER_SUFFIX); #define setWholeTimingTable(x) setWholeTimingTable_d(x PASS_CONFIG_PARAMETER_SUFFIX);
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX); void setConstantDwell(floatms_t dwellMs DECLARE_CONFIG_PARAMETER_SUFFIX);
void printFloatArray(const char *prefix, float array[], int size); void printFloatArray(const char *prefix, float array[], int size);
// needed by bootloader // needed by bootloader

View File

@ -234,7 +234,7 @@ static void setFsioOutputPin(const char *indexStr, const char *pinName) {
/** /**
* index is between zero and LE_COMMAND_LENGTH-1 * index is between zero and LE_COMMAND_LENGTH-1
*/ */
void setFsioExt(int index, brain_pin_e pin, const char * formula, int pwmFrequency DECLARE_ENGINE_PARAMETER_SUFFIX) { void setFsioExt(int index, brain_pin_e pin, const char * formula, int pwmFrequency DECLARE_CONFIG_PARAMETER_SUFFIX) {
CONFIGB(fsioOutputPins)[index] = pin; CONFIGB(fsioOutputPins)[index] = pin;
int len = strlen(formula); int len = strlen(formula);
if (len >= LE_COMMAND_LENGTH) { if (len >= LE_COMMAND_LENGTH) {
@ -244,8 +244,8 @@ void setFsioExt(int index, brain_pin_e pin, const char * formula, int pwmFrequen
CONFIGB(fsioFrequency)[index] = pwmFrequency; CONFIGB(fsioFrequency)[index] = pwmFrequency;
} }
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_ENGINE_PARAMETER_SUFFIX) { void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMETER_SUFFIX) {
setFsioExt(index, pin, exp, NO_PWM PASS_ENGINE_PARAMETER_SUFFIX); setFsioExt(index, pin, exp, NO_PWM PASS_CONFIG_PARAMETER_SUFFIX);
} }
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {

View File

@ -21,8 +21,8 @@ typedef Map3D<FSIO_TABLE_8, FSIO_TABLE_8, uint8_t> fsio8_Map3D_u8t;
#define MAGIC_OFFSET_FOR_CRITICAL_ENGINE 5 #define MAGIC_OFFSET_FOR_CRITICAL_ENGINE 5
float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX); float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX);
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_ENGINE_PARAMETER_SUFFIX); void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMETER_SUFFIX);
void setFsioExt(int index, brain_pin_e pin, const char * exp, int pwmFrequency DECLARE_ENGINE_PARAMETER_SUFFIX); void setFsioExt(int index, brain_pin_e pin, const char * exp, int pwmFrequency DECLARE_CONFIG_PARAMETER_SUFFIX);
void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE); void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);

View File

@ -29,14 +29,16 @@
extern engine_configuration_s *engineConfiguration; \ extern engine_configuration_s *engineConfiguration; \
extern board_configuration_s *boardConfiguration; \ extern board_configuration_s *boardConfiguration; \
extern engine_configuration_s activeConfiguration; \ extern engine_configuration_s activeConfiguration; \
extern persistent_config_s *config; extern persistent_config_container_s persistentState; \
extern persistent_config_s *config; \
#define EXTERN_ENGINE \ #define EXTERN_ENGINE \
extern Engine ___engine; \ extern Engine ___engine; \
extern Engine *engine; \ extern Engine *engine; \
extern persistent_config_container_s persistentState; \
EXTERN_CONFIG \ EXTERN_CONFIG \
extern EnginePins enginePins extern EnginePins enginePins \
// Use this macro to declare a function which only takes magic references // Use this macro to declare a function which only takes magic references
#define DECLARE_ENGINE_PARAMETER_SIGNATURE void #define DECLARE_ENGINE_PARAMETER_SIGNATURE void

View File

@ -172,7 +172,7 @@ static void initEgoSensor(afr_sensor_s *sensor, ego_sensor_e type) {
} }
} }
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_SUFFIX) { void setEgoSensor(ego_sensor_e type DECLARE_CONFIG_PARAMETER_SUFFIX) {
CONFIGB(afr_type) = type; CONFIGB(afr_type) = type;
initEgoSensor(&engineConfiguration->afr, type); initEgoSensor(&engineConfiguration->afr, type);
} }

View File

@ -15,7 +15,7 @@
float getAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE); float getAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE);
bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE); bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_SUFFIX); void setEgoSensor(ego_sensor_e type DECLARE_CONFIG_PARAMETER_SUFFIX);
void initEgoAveraging(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initEgoAveraging(DECLARE_ENGINE_PARAMETER_SIGNATURE);
#endif #endif

View File

@ -1300,7 +1300,7 @@ static void setValue(const char *paramStr, const char *valueStr) {
} else if (strEqualCaseInsensitive(paramStr, "warning_period")) { } else if (strEqualCaseInsensitive(paramStr, "warning_period")) {
engineConfiguration->warningPeriod = valueI; engineConfiguration->warningPeriod = valueI;
} else if (strEqualCaseInsensitive(paramStr, "dwell")) { } else if (strEqualCaseInsensitive(paramStr, "dwell")) {
setConstantDwell(valueF PASS_ENGINE_PARAMETER_SUFFIX); setConstantDwell(valueF PASS_CONFIG_PARAMETER_SUFFIX);
} else if (strEqualCaseInsensitive(paramStr, "engineSnifferRpmThreshold")) { } else if (strEqualCaseInsensitive(paramStr, "engineSnifferRpmThreshold")) {
engineConfiguration->engineSnifferRpmThreshold = valueI; engineConfiguration->engineSnifferRpmThreshold = valueI;
} else if (strEqualCaseInsensitive(paramStr, "step1rpm")) { } else if (strEqualCaseInsensitive(paramStr, "step1rpm")) {

View File

@ -103,7 +103,7 @@ TEST(fuelCut, criticalEngineTemperature) {
setupSimpleTestEngineWithMafAndTT_ONE_trigger(&eth); setupSimpleTestEngineWithMafAndTT_ONE_trigger(&eth);
engineConfiguration->useFSIO5ForCriticalIssueEngineStop = true; engineConfiguration->useFSIO5ForCriticalIssueEngineStop = true;
setFsio(MAGIC_OFFSET_FOR_CRITICAL_ENGINE, GPIOD_7, TOO_HOT_LOGIC PASS_ENGINE_PARAMETER_SUFFIX); setFsio(MAGIC_OFFSET_FOR_CRITICAL_ENGINE, GPIOD_7, TOO_HOT_LOGIC PASS_CONFIG_PARAMETER_SUFFIX);
applyFsioConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); applyFsioConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
// we need some non-zero time as getTimeNow() which would become stopEngineRequestTimeNt // we need some non-zero time as getTimeNow() which would become stopEngineRequestTimeNt

View File

@ -1101,7 +1101,7 @@ TEST(big, testSparkReverseOrderBug319) {
engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
setConstantDwell(45 PASS_ENGINE_PARAMETER_SUFFIX); setConstantDwell(45 PASS_CONFIG_PARAMETER_SUFFIX);
// this is needed to update injectorLag // this is needed to update injectorLag
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE); engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);