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

This commit is contained in:
rusefi 2019-01-10 21:10:46 -05:00
parent dd8e2d9326
commit 3921d36540
9 changed files with 13 additions and 12 deletions

View File

@ -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_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable(25);
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED; boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;

View File

@ -178,7 +178,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// set_whole_fuel_map 9 // set_whole_fuel_map 9
setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX); setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX);
setWholeTimingTable(12 PASS_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(12 PASS_CONFIG_PARAMETER_SUFFIX);
// set cranking_injection_mode 0 // set cranking_injection_mode 0
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
@ -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_CONFIG_PARAMETER_SUFFIX); //setWholeTimingTable_d(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);

View File

@ -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_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
boardConfiguration->alternatorControlPin = GPIOD_7; boardConfiguration->alternatorControlPin = GPIOD_7;

View File

@ -147,7 +147,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->cranking.baseFuel = 9; engineConfiguration->cranking.baseFuel = 9;
setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 105, 5); setLinearCurve(config->ignitionLoadBins, IGN_LOAD_COUNT, 20, 105, 5);
setWholeTimingTable(10 PASS_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
// set_whole_fuel_map 5 // set_whole_fuel_map 5
setWholeFuelMap(5 PASS_CONFIG_PARAMETER_SUFFIX); setWholeFuelMap(5 PASS_CONFIG_PARAMETER_SUFFIX);
setAfrMap(config->afrTable, 13.5); setAfrMap(config->afrTable, 13.5);

View File

@ -69,7 +69,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX); setWholeFuelMap(9 PASS_CONFIG_PARAMETER_SUFFIX);
// set_whole_timing_map 10 // set_whole_timing_map 10
setWholeTimingTable(10 PASS_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
// http://s1.micp.ru/tOb0U.png // http://s1.micp.ru/tOb0U.png
setThermistorConfiguration(&engineConfiguration->clt, -15, 5900, 23, 1750, 97, 165); setThermistorConfiguration(&engineConfiguration->clt, -15, 5900, 23, 1750, 97, 165);

View File

@ -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_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable_d(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;

View File

@ -261,7 +261,7 @@ void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_SUFFIX) {
/** /**
* See also crankingTimingAngle * See also crankingTimingAngle
*/ */
void setWholeTimingTable(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX) { void setWholeTimingTable_d(angle_t value DECLARE_CONFIG_PARAMETER_SUFFIX) {
setTimingMap(config->ignitionTable, value); setTimingMap(config->ignitionTable, value);
} }

View File

@ -59,7 +59,8 @@ 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_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_ENGINE_PARAMETER_SUFFIX);
void setWholeTimingTable(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);
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);

View File

@ -1201,7 +1201,7 @@ void testSparkReverseOrderBug319(void) {
timeNowUs = 0; timeNowUs = 0;
setWholeTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable(0);
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_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable(3);
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_CONFIG_PARAMETER_SUFFIX); setWholeTimingTable(-5);
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);