The Big Refactoring of 2019: DECLARE_ENGINE_PARAMETER_SUFFIX consistency and simplification #657
This commit is contained in:
parent
1e4bdbb255
commit
dd8e2d9326
|
@ -27,7 +27,7 @@ static void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR/*FOUR_STROKE_CAM_SENSOR*/);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR/*FOUR_STROKE_CAM_SENSOR*/);
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||||
//engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
//engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 4;
|
engineConfiguration->specs.cylindersCount = 4;
|
||||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||||
|
|
|
@ -66,10 +66,10 @@ static const fuel_table_t default_139qmb_fuel_table = {
|
||||||
|
|
||||||
static void setDefault139qmbMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefault139qmbMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(1000, 11000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(1000, 11000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
copyFuelTable(default_139qmb_fuel_table, config->fuelTable);
|
copyFuelTable(default_139qmb_fuel_table, config->fuelTable);
|
||||||
//copyTimingTable(default_139qmb_timing_table, config->ignitionTable);
|
//copyTimingTable(default_139qmb_timing_table, config->ignitionTable);
|
||||||
|
|
|
@ -52,14 +52,14 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
|
|
||||||
// Injection settings
|
// Injection settings
|
||||||
setFlatInjectorLag(1.15 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFlatInjectorLag(1.15 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
engineConfiguration->injector.flow = 750;
|
engineConfiguration->injector.flow = 750;
|
||||||
|
|
||||||
// General settings
|
// General settings
|
||||||
boardConfiguration->tunerStudioSerialSpeed = 57600;
|
boardConfiguration->tunerStudioSerialSpeed = 57600;
|
||||||
engineConfiguration->rpmHardLimit = 7000;
|
engineConfiguration->rpmHardLimit = 7000;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
|
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
|
||||||
boardConfiguration->sensorChartMode = SC_OFF;
|
boardConfiguration->sensorChartMode = SC_OFF;
|
||||||
|
@ -93,7 +93,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
setWholeTimingTable(25 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(25 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ void set1973c20(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.customSkippedToothCount = 0;
|
engineConfiguration->trigger.customSkippedToothCount = 0;
|
||||||
|
|
||||||
engineConfiguration->rpmHardLimit = 5000;
|
engineConfiguration->rpmHardLimit = 5000;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
engineConfiguration->specs.displacement = 5.7;
|
engineConfiguration->specs.displacement = 5.7;
|
||||||
engineConfiguration->specs.cylindersCount = 8;
|
engineConfiguration->specs.cylindersCount = 8;
|
||||||
|
|
|
@ -98,10 +98,10 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
/**
|
/**
|
||||||
* Algorithm Alpha-N setting
|
* Algorithm Alpha-N setting
|
||||||
*/
|
*/
|
||||||
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs
|
* Outputs
|
||||||
|
|
|
@ -144,7 +144,7 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||||
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#if EFI_PWM_TESTER
|
#if EFI_PWM_TESTER
|
||||||
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
|
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
|
||||||
|
|
|
@ -299,7 +299,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
*/
|
*/
|
||||||
//setWholeFuelMap(12 PASS_ENGINE_PARAMETER_SUFFIX);
|
//setWholeFuelMap(12 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
// copyFuelTable(alphaNfuel, config->fuelTable);
|
// copyFuelTable(alphaNfuel, config->fuelTable);
|
||||||
//setWholeTimingTable(12 PASS_ENGINE_PARAMETER_SUFFIX);
|
//setWholeTimingTable(12 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
copyTimingTable(fromODB, config->ignitionTable);
|
copyTimingTable(fromODB, config->ignitionTable);
|
||||||
|
|
||||||
copy2DTable<FSIO_TABLE_8, FSIO_TABLE_8, float>(vBattTarget, config->fsioTable1);
|
copy2DTable<FSIO_TABLE_8, FSIO_TABLE_8, float>(vBattTarget, config->fsioTable1);
|
||||||
|
@ -321,12 +321,12 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
//engineConfiguration->fuelAlgorithm = LM_ALPHA_N; // I want to start with a simple Alpha-N
|
//engineConfiguration->fuelAlgorithm = LM_ALPHA_N; // I want to start with a simple Alpha-N
|
||||||
|
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 120, 1);
|
setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 120, 1);
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
setFuelTablesLoadBin(20, 120 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelTablesLoadBin(20, 120 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// boardConfiguration->tunerStudioSerialSpeed = 9600;
|
// boardConfiguration->tunerStudioSerialSpeed = 9600;
|
||||||
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
//temp boardConfiguration->alternatorControlPin = GPIOD_5;
|
//temp boardConfiguration->alternatorControlPin = GPIOD_5;
|
||||||
engineConfiguration->targetVBatt = 14.0;
|
engineConfiguration->targetVBatt = 14.0;
|
||||||
|
|
|
@ -23,7 +23,7 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_DODGE_RAM;
|
engineConfiguration->trigger.type = TT_DODGE_RAM;
|
||||||
engineConfiguration->injector.flow = 243.6; // 23.2lb/h
|
engineConfiguration->injector.flow = 243.6; // 23.2lb/h
|
||||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// set cranking_charge_angle 30
|
// set cranking_charge_angle 30
|
||||||
engineConfiguration->crankingChargeAngle = 30;
|
engineConfiguration->crankingChargeAngle = 30;
|
||||||
|
@ -69,7 +69,7 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// set_global_fuel_correction 1
|
// set_global_fuel_correction 1
|
||||||
|
|
||||||
// set_whole_timing_map 10
|
// set_whole_timing_map 10
|
||||||
setWholeTimingTable(10 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(10 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
boardConfiguration->alternatorControlPin = GPIOD_7;
|
boardConfiguration->alternatorControlPin = GPIOD_7;
|
||||||
|
|
|
@ -20,7 +20,7 @@ void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6;
|
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6;
|
||||||
|
|
||||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_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[0] = GPIOC_9;
|
||||||
|
|
|
@ -69,10 +69,10 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
copyFuelTable(default_aspire_fuel_table, config->fuelTable);
|
copyFuelTable(default_aspire_fuel_table, config->fuelTable);
|
||||||
copyTimingTable(default_aspire_timing_table, config->ignitionTable);
|
copyTimingTable(default_aspire_timing_table, config->ignitionTable);
|
||||||
|
|
|
@ -79,11 +79,11 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->globalFuelCorrection = 0.75;
|
engineConfiguration->globalFuelCorrection = 0.75;
|
||||||
engineConfiguration->specs.displacement = 1.839;
|
engineConfiguration->specs.displacement = 1.839;
|
||||||
// engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
// engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
// engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
// engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||||
|
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
config->veRpmBins[0] = 800;
|
config->veRpmBins[0] = 800;
|
||||||
config->veRpmBins[1] = 1200;
|
config->veRpmBins[1] = 1200;
|
||||||
|
|
|
@ -49,10 +49,10 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
static void setDefaultCustomMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultCustomMaps(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setFuelLoadBin(0,100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(0, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(0, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(0,100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(0,7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(0,7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
copyFuelTable(default_custom_fuel_table, config->fuelTable);
|
copyFuelTable(default_custom_fuel_table, config->fuelTable);
|
||||||
copyFuelTable(default_custom_fuel_table, config->veTable);
|
copyFuelTable(default_custom_fuel_table, config->veTable);
|
||||||
|
@ -145,7 +145,7 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
boardConfiguration->injectionPins[3] = GPIOB_8; // #4
|
boardConfiguration->injectionPins[3] = GPIOB_8; // #4
|
||||||
|
|
||||||
setDefaultCustomMaps(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultCustomMaps(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
|
|
|
@ -56,10 +56,10 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE
|
||||||
// Keihin 06164-P0A-A00
|
// Keihin 06164-P0A-A00
|
||||||
engineConfiguration->injector.flow = 248;
|
engineConfiguration->injector.flow = 248;
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
buildTimingMap(35 PASS_ENGINE_PARAMETER_SUFFIX);
|
buildTimingMap(35 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 18K Ohm @ -20C
|
* 18K Ohm @ -20C
|
||||||
|
|
|
@ -62,8 +62,8 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->tpsMin = 80;
|
engineConfiguration->tpsMin = 80;
|
||||||
engineConfiguration->tpsMax = 764;
|
engineConfiguration->tpsMax = 764;
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// set_whole_fuel_map 9
|
// set_whole_fuel_map 9
|
||||||
setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX);
|
setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -135,8 +135,8 @@ static void commonMiataNa(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->idle.solenoidFrequency = 160;
|
boardConfiguration->idle.solenoidFrequency = 160;
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
||||||
|
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// todo: make this official Frankenstein joystick?
|
// todo: make this official Frankenstein joystick?
|
||||||
boardConfiguration->joystickCenterPin = GPIOD_8;
|
boardConfiguration->joystickCenterPin = GPIOD_8;
|
||||||
|
|
|
@ -81,8 +81,8 @@ void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
boardConfiguration->fuelPumpPin = GPIOE_6;
|
boardConfiguration->fuelPumpPin = GPIOE_6;
|
||||||
|
|
||||||
// todo: extract a method? figure out something smarter
|
// todo: extract a method? figure out something smarter
|
||||||
setFuelRpmBin(800, 15000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 15000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(800, 15000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(800, 15000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setLinearCurve(config->veRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
setLinearCurve(config->veRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
||||||
setLinearCurve(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
setLinearCurve(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||||
|
|
||||||
// set algorithm 3
|
// set algorithm 3
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->camInput = GPIOA_5;
|
engineConfiguration->camInput = GPIOA_5;
|
||||||
|
|
|
@ -18,7 +18,7 @@ EXTERN_ENGINE;
|
||||||
void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
setWholeTimingTable(20 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(20 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
engineConfiguration->cranking.baseFuel = 12;
|
engineConfiguration->cranking.baseFuel = 12;
|
||||||
// set cranking_timing_angle 10
|
// set cranking_timing_angle 10
|
||||||
engineConfiguration->crankingTimingAngle = 10;
|
engineConfiguration->crankingTimingAngle = 10;
|
||||||
|
@ -44,7 +44,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->specs.displacement = 2.0;
|
engineConfiguration->specs.displacement = 2.0;
|
||||||
engineConfiguration->injector.flow = 320; // 30lb/h
|
engineConfiguration->injector.flow = 320; // 30lb/h
|
||||||
// set algorithm 3
|
// set algorithm 3
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||||
|
@ -58,8 +58,8 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
float mapRange = 110;
|
float mapRange = 110;
|
||||||
|
|
||||||
setEgoSensor(ES_PLX PASS_ENGINE_PARAMETER_SUFFIX);
|
setEgoSensor(ES_PLX PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
setFuelTablesLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelTablesLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
boardConfiguration->isSdCardEnabled = false;
|
boardConfiguration->isSdCardEnabled = false;
|
||||||
engineConfiguration->tpsMin = 740;
|
engineConfiguration->tpsMin = 740;
|
||||||
|
|
|
@ -257,7 +257,7 @@ float getInitialAdvance(int rpm, float map, float advanceMax) {
|
||||||
/**
|
/**
|
||||||
* this method builds a good-enough base timing advance map bases on a number of heuristics
|
* this method builds a good-enough base timing advance map bases on a number of heuristics
|
||||||
*/
|
*/
|
||||||
void buildTimingMap(float advanceMax DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void buildTimingMap(float advanceMax DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
if (engineConfiguration->fuelAlgorithm != LM_SPEED_DENSITY &&
|
if (engineConfiguration->fuelAlgorithm != LM_SPEED_DENSITY &&
|
||||||
engineConfiguration->fuelAlgorithm != LM_MAP) {
|
engineConfiguration->fuelAlgorithm != LM_MAP) {
|
||||||
warning(CUSTOM_WRONG_ALGORITHM, "wrong algorithm for MAP-based timing");
|
warning(CUSTOM_WRONG_ALGORITHM, "wrong algorithm for MAP-based timing");
|
||||||
|
|
|
@ -15,6 +15,6 @@ void setDefaultIatTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void prepareTimingMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void prepareTimingMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore);
|
float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore);
|
||||||
float getInitialAdvance(int rpm, float map, float advanceMax);
|
float getInitialAdvance(int rpm, float map, float advanceMax);
|
||||||
void buildTimingMap(float advanceMax DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void buildTimingMap(float advanceMax DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* ADVANCE_H_ */
|
#endif /* ADVANCE_H_ */
|
||||||
|
|
|
@ -240,7 +240,7 @@ void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
setMap(config->ignitionIatCorrTable, value);
|
setMap(config->ignitionIatCorrTable, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setLinearCurve(config->injPhaseLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
setLinearCurve(config->injPhaseLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
||||||
setLinearCurve(config->veLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
setLinearCurve(config->veLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
||||||
setLinearCurve(config->afrLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
setLinearCurve(config->afrLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1);
|
||||||
|
@ -261,7 +261,7 @@ void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
/**
|
/**
|
||||||
* See also crankingTimingAngle
|
* See also crankingTimingAngle
|
||||||
*/
|
*/
|
||||||
void setWholeTimingTable(angle_t value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setWholeTimingTable(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setTimingMap(config->ignitionTable, value);
|
setTimingMap(config->ignitionTable, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ static void setBosch02880155868(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->injector.battLagCorr[7] = 0.726;
|
engineConfiguration->injector.battLagCorr[7] = 0.726;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDefaultWarmupIdleCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultWarmupIdleCorrection(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
initTemperatureCurve(CLT_MANUAL_IDLE_CORRECTION, PERCENT_MULT);
|
initTemperatureCurve(CLT_MANUAL_IDLE_CORRECTION, PERCENT_MULT);
|
||||||
|
|
||||||
float baseIdle = 30;
|
float baseIdle = 30;
|
||||||
|
@ -684,7 +684,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setLinearCurve(engineConfiguration->fsioCurve4Bins, FSIO_CURVE_8, 0, 100, 1);
|
setLinearCurve(engineConfiguration->fsioCurve4Bins, FSIO_CURVE_8, 0, 100, 1);
|
||||||
|
|
||||||
|
|
||||||
setDefaultWarmupIdleCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultWarmupIdleCorrection(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
setDefaultWarmupFuelEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultWarmupFuelEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
@ -697,10 +697,10 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->useConstantDwellDuringCranking = false;
|
engineConfiguration->useConstantDwellDuringCranking = false;
|
||||||
engineConfiguration->ignitionDwellForCrankingMs = 6;
|
engineConfiguration->ignitionDwellForCrankingMs = 6;
|
||||||
|
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
setLinearCurve(engineConfiguration->map.samplingAngleBins, MAP_ANGLE_SIZE, 800, 7000, 1);
|
setLinearCurve(engineConfiguration->map.samplingAngleBins, MAP_ANGLE_SIZE, 800, 7000, 1);
|
||||||
setLinearCurve(engineConfiguration->map.samplingAngle, MAP_ANGLE_SIZE, 100, 130, 1);
|
setLinearCurve(engineConfiguration->map.samplingAngle, MAP_ANGLE_SIZE, 100, 130, 1);
|
||||||
|
@ -715,7 +715,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setMap(config->injectionPhase, -180);
|
setMap(config->injectionPhase, -180);
|
||||||
setRpmTableBin(config->injPhaseRpmBins, FUEL_RPM_COUNT);
|
setRpmTableBin(config->injPhaseRpmBins, FUEL_RPM_COUNT);
|
||||||
setFuelTablesLoadBin(10, 160 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelTablesLoadBin(10, 160 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setDefaultIatTimingCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultIatTimingCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
setLinearCurve(engineConfiguration->mapAccelTaperBins, FSIO_TABLE_8, 0, 32, 4);
|
setLinearCurve(engineConfiguration->mapAccelTaperBins, FSIO_TABLE_8, 0, 32, 4);
|
||||||
|
|
|
@ -57,9 +57,9 @@ 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_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_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_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setWholeTimingTable(angle_t value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setWholeTimingTable(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void printFloatArray(const char *prefix, float array[], int size);
|
void printFloatArray(const char *prefix, float array[], int size);
|
||||||
|
|
||||||
|
|
|
@ -492,35 +492,35 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setFuelRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setFuelRpmBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setTableBin(config->fuelRpmBins, FUEL_RPM_COUNT, from, to);
|
setTableBin(config->fuelRpmBins, FUEL_RPM_COUNT, from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFuelLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setFuelLoadBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setTableBin(config->fuelLoadBins, FUEL_LOAD_COUNT, from, to);
|
setTableBin(config->fuelLoadBins, FUEL_LOAD_COUNT, from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTimingRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setTimingRpmBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setRpmBin(config->ignitionRpmBins, IGN_RPM_COUNT, from, to);
|
setRpmBin(config->ignitionRpmBins, IGN_RPM_COUNT, from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTimingLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setTimingLoadBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setTableBin(config->ignitionLoadBins, IGN_LOAD_COUNT, from, to);
|
setTableBin(config->ignitionLoadBins, IGN_LOAD_COUNT, from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this method sets algorithm and ignition table scale
|
* this method sets algorithm and ignition table scale
|
||||||
*/
|
*/
|
||||||
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setAlgorithm(engine_load_mode_e algo DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
engineConfiguration->fuelAlgorithm = algo;
|
engineConfiguration->fuelAlgorithm = algo;
|
||||||
if (algo == LM_ALPHA_N) {
|
if (algo == LM_ALPHA_N) {
|
||||||
setTimingLoadBin(20, 120 PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(20, 120 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
} else if (algo == LM_SPEED_DENSITY) {
|
} else if (algo == LM_SPEED_DENSITY) {
|
||||||
setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 120, 3);
|
setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 120, 3);
|
||||||
buildTimingMap(35 PASS_ENGINE_PARAMETER_SUFFIX);
|
buildTimingMap(35 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFlatInjectorLag(float value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void setFlatInjectorLag(float value DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
setArrayValues(engineConfiguration->injector.battLagCorr, VBAT_INJECTOR_CURVE_SIZE, value);
|
setArrayValues(engineConfiguration->injector.battLagCorr, VBAT_INJECTOR_CURVE_SIZE, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setAlgorithm(engine_load_mode_e algo DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#define assertEngineReference() efiAssertVoid(CUSTOM_ENGINE_REF, engine != NULL, "engine is NULL")
|
#define assertEngineReference() efiAssertVoid(CUSTOM_ENGINE_REF, engine != NULL, "engine is NULL")
|
||||||
|
|
||||||
void setFlatInjectorLag(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setFlatInjectorLag(float value DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#define fixAngle(angle, msg, code) fixAngle2(angle, msg, code, ENGINE(engineCycle))
|
#define fixAngle(angle, msg, code) fixAngle2(angle, msg, code, ENGINE(engineCycle))
|
||||||
|
|
||||||
|
@ -57,10 +57,10 @@ void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAM
|
||||||
|
|
||||||
int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setFuelRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setFuelRpmBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
void setFuelLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setFuelLoadBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
void setTimingRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setTimingRpmBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
void setTimingLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void setTimingLoadBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setSingleCoilDwell(engine_configuration_s *engineConfiguration);
|
void setSingleCoilDwell(engine_configuration_s *engineConfiguration);
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,6 @@ EXTERN_ENGINE;
|
||||||
#define LS_RESPONSE "ls_result"
|
#define LS_RESPONSE "ls_result"
|
||||||
#define FILE_LIST_MAX_COUNT 20
|
#define FILE_LIST_MAX_COUNT 20
|
||||||
|
|
||||||
extern board_configuration_s *boardConfiguration;
|
|
||||||
|
|
||||||
#if HAL_USE_USB_MSD
|
#if HAL_USE_USB_MSD
|
||||||
#if STM32_USB_USE_OTG2
|
#if STM32_USB_USE_OTG2
|
||||||
USBDriver *usb_driver = &USBD2;
|
USBDriver *usb_driver = &USBD2;
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include "rtc_helper.h"
|
#include "rtc_helper.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
extern board_configuration_s *boardConfiguration;
|
|
||||||
extern engine_configuration_s *engineConfiguration;
|
|
||||||
|
|
||||||
static LoggingWithStorage logging("uart gps");
|
static LoggingWithStorage logging("uart gps");
|
||||||
|
|
||||||
static SerialConfig GPSserialConfig = { GPS_SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
|
static SerialConfig GPSserialConfig = { GPS_SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
|
||||||
|
|
|
@ -56,6 +56,7 @@ void print(const char *fmt, ...);
|
||||||
#define CCM_OPTIONAL
|
#define CCM_OPTIONAL
|
||||||
|
|
||||||
#define EXTERN_ENGINE extern EnginePins enginePins
|
#define EXTERN_ENGINE extern EnginePins enginePins
|
||||||
|
#define EXTERN_CONFIG
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
class Engine;
|
class Engine;
|
||||||
|
|
|
@ -86,7 +86,7 @@ void testFuelMap(void) {
|
||||||
eth.engine.config->cltFuelCorr[i] = 100;
|
eth.engine.config->cltFuelCorr[i] = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
setFlatInjectorLag(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFlatInjectorLag(0 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
assertEquals(NAN, getIntakeAirTemperature(PASS_ENGINE_PARAMETER_SIGNATURE));
|
assertEquals(NAN, getIntakeAirTemperature(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
float iatCorrection = getIatFuelCorrection(-KELV PASS_ENGINE_PARAMETER_SUFFIX);
|
float iatCorrection = getIatFuelCorrection(-KELV PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -317,7 +317,7 @@ void testRpmCalculator(void) {
|
||||||
engineConfiguration->globalFuelCorrection = 3;
|
engineConfiguration->globalFuelCorrection = 3;
|
||||||
eth.applyTriggerShape();
|
eth.applyTriggerShape();
|
||||||
|
|
||||||
setFlatInjectorLag(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFlatInjectorLag(0 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);
|
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
timeNowUs = 0;
|
timeNowUs = 0;
|
||||||
|
@ -1201,7 +1201,7 @@ void testSparkReverseOrderBug319(void) {
|
||||||
|
|
||||||
|
|
||||||
timeNowUs = 0;
|
timeNowUs = 0;
|
||||||
setWholeTimingTable(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
eth.fireRise(20);
|
eth.fireRise(20);
|
||||||
|
@ -1327,7 +1327,7 @@ void testMissedSpark299(void) {
|
||||||
|
|
||||||
assertEquals(3000, eth.engine.rpmCalculator.rpmValue);
|
assertEquals(3000, eth.engine.rpmCalculator.rpmValue);
|
||||||
|
|
||||||
setWholeTimingTable(3 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(3 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1344,7 +1344,7 @@ void testMissedSpark299(void) {
|
||||||
eth.fireFall(20);
|
eth.fireFall(20);
|
||||||
engine->executor.executeAll(timeNowUs);
|
engine->executor.executeAll(timeNowUs);
|
||||||
|
|
||||||
setWholeTimingTable(-5 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(-5 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue