Add single flag for omitting PnP configs (#1157)

* switch to single enable flag

* engine_configuration.cpp
This commit is contained in:
Matthew Kennedy 2020-02-24 16:08:02 -08:00 committed by GitHub
parent 0b72db0811
commit 8647abd22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 46 additions and 111 deletions

View File

@ -208,14 +208,9 @@
#endif
/**
* While we embed multiple PnP configurations into the same firmware binary, these marcoses give us control
* over which configurations go into the binary
* Should PnP engine configurations be included in the binary?
*/
#define EFI_SUPPORT_DODGE_NEON FALSE
#define EFI_SUPPORT_FORD_ASPIRE FALSE
#define EFI_SUPPORT_FORD_FIESTA FALSE
#define EFI_SUPPORT_NISSAN_PRIMERA FALSE
#define EFI_SUPPORT_1995_FORD_INLINE_6 FALSE
#define EFI_INCLUDE_ENGINE_PRESETS FALSE
#ifndef EFI_ENGINE_SNIFFER
#define EFI_ENGINE_SNIFFER FALSE

View File

@ -221,14 +221,10 @@
#define EFI_USB_SERIAL TRUE
// For now we can still embed all car configurations into the firmware binary.
// These give us control over which configurations go in.
#define EFI_SUPPORT_DODGE_NEON TRUE
#define EFI_SUPPORT_FORD_ASPIRE TRUE
#define EFI_SUPPORT_FORD_FIESTA TRUE
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
/**
* Should PnP engine configurations be included in the binary?
*/
#define EFI_INCLUDE_ENGINE_PRESETS TRUE
#ifndef EFI_ENGINE_SNIFFER
#define EFI_ENGINE_SNIFFER TRUE

View File

@ -14,8 +14,6 @@
#include "global.h"
#if EFI_SUPPORT_DODGE_NEON
#include "dodge_neon.h"
#include "engine_configuration.h"
#include "thermistors.h"
@ -502,6 +500,3 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// end of setDodgeNeonNGCEngineConfiguration
}
#endif /* EFI_SUPPORT_DODGE_NEON */

View File

@ -9,8 +9,6 @@
#ifndef DODGE_NEON_H_
#define DODGE_NEON_H_
#if EFI_SUPPORT_DODGE_NEON
#include "engine_configuration.h"
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
@ -22,6 +20,4 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
*/
void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* EFI_SUPPORT_DODGE_NEON */
#endif /* DODGE_NEON_H_ */

View File

@ -16,8 +16,6 @@
#include "engine_math.h"
#include "allsensors.h"
#if EFI_SUPPORT_1995_FORD_INLINE_6
EXTERN_CONFIG;
/**
@ -101,5 +99,3 @@ void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->logicAnalyzerPins[0] = GPIOC_6;
engineConfiguration->logicAnalyzerPins[1] = GPIOE_5;
}
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */

View File

@ -18,8 +18,6 @@
#include "advance_map.h"
#include "engine_configuration.h"
#if EFI_SUPPORT_FORD_ASPIRE
#if DEFAULT_FUEL_LOAD_COUNT == FUEL_LOAD_COUNT
/**
@ -161,5 +159,3 @@ void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->engineSnifferRpmThreshold = 13000;
engineConfiguration->sensorSnifferRpmThreshold = 13000;
}
#endif /* EFI_SUPPORT_FORD_ASPIRE */

View File

@ -11,8 +11,6 @@
#include "global.h"
#if EFI_SUPPORT_FORD_FIESTA
#include "ford_fiesta.h"
#include "engine_math.h"
@ -30,5 +28,3 @@ void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE)
engineConfiguration->mafAdcChannel = EFI_ADC_14;
// engineConfiguration->mafAdcChannel = EFI_ADC_NONE; this would kill functional tests
}
#endif /* EFI_SUPPORT_FORD_FIESTA */

View File

@ -5,13 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef FORD_FIESTA_H_
#define FORD_FIESTA_H_
#if EFI_SUPPORT_FORD_FIESTA
#pragma once
#include "engine_configuration.h"
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
#endif /* EFI_SUPPORT_FORD_FIESTA */
#endif /* FORD_FIESTA_H_ */

View File

@ -10,7 +10,6 @@
#include "global.h"
#if EFI_SUPPORT_NISSAN_PRIMERA
#include "nissan_primera.h"
EXTERN_CONFIG;
@ -32,5 +31,3 @@ void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
void setNissanPrimeraEngineConfiguration_360(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_NISSAN_SR20VE_360;
}
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */

View File

@ -7,11 +7,7 @@
#pragma once
#if EFI_SUPPORT_NISSAN_PRIMERA
#include "engine_configuration.h"
void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setNissanPrimeraEngineConfiguration_360(DECLARE_CONFIG_PARAMETER_SIGNATURE);
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */

View File

@ -244,14 +244,9 @@
#endif
/**
* While we embed multiple PnP configurations into the same firmware binary, these marcoses give us control
* over which configurations go into the binary
* Should PnP engine configurations be included in the binary?
*/
#define EFI_SUPPORT_DODGE_NEON TRUE
#define EFI_SUPPORT_FORD_ASPIRE TRUE
#define EFI_SUPPORT_FORD_FIESTA TRUE
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
#define EFI_INCLUDE_ENGINE_PRESETS TRUE
#ifndef EFI_ENGINE_SNIFFER
#define EFI_ENGINE_SNIFFER TRUE

View File

@ -708,7 +708,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setLinearCurve(engineConfiguration->fsioCurve3Bins, 0, 100, 1);
setLinearCurve(engineConfiguration->fsioCurve4Bins, 0, 100, 1);
#if EFI_ENGINE_CONTROL
setDefaultWarmupIdleCorrection(PASS_CONFIG_PARAMETER_SIGNATURE);
setDefaultWarmupFuelEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
@ -999,7 +999,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->tpsAccelLength = 12;
engineConfiguration->tpsAccelEnrichmentThreshold = 40; // TPS % change, per engine cycle
#endif // EFI_ENGINE_CONTROL
#if EFI_FSIO
/**
* to test:
@ -1109,6 +1109,32 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
* And override them with engine-specific defaults
*/
switch (engineType) {
case MICRO_RUS_EFI:
// todo: is it time to replace MICRO_RUS_EFI, PROTEUS, PROMETHEUS_DEFAULTS with MINIMAL_PINS? maybe rename MINIMAL_PINS to DEFAULT?
case PROTEUS:
case PROMETHEUS_DEFAULTS:
case MINIMAL_PINS:
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
// nothing to do - we do it all in setBoardConfigurationOverrides
break;
case MRE_BOARD_TEST:
mreBoardTest(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case TEST_ENGINE:
setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_UNIT_TEST
case TEST_ISSUE_366_BOTH:
setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case TEST_ISSUE_366_RISE:
setTestEngineIssue366rise(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case ISSUE_898:
setIssue898(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif // EFI_UNIT_TEST
#if EFI_INCLUDE_ENGINE_PRESETS
case DEFAULT_FRANKENSO:
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
@ -1127,29 +1153,12 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case MRE_MIATA_NA6:
setMiataNA6_VAF_MRE(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_UNIT_TEST
case ISSUE_898:
setIssue898(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif
case MRE_MIATA_NB2_MTB:
setMiataNB2_MRE_MTB(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case MRE_MIATA_NB2:
setMiataNB2_MRE_ETB(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case MICRO_RUS_EFI:
// todo: is it time to replace MICRO_RUS_EFI, PROTEUS, PROMETHEUS_DEFAULTS with MINIMAL_PINS? maybe rename MINIMAL_PINS to DEFAULT?
case PROTEUS:
case PROMETHEUS_DEFAULTS:
case MINIMAL_PINS:
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
// nothing to do - we do it all in setBoardConfigurationOverrides
break;
case MRE_BOARD_TEST:
mreBoardTest(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_SUPPORT_DODGE_NEON
case DODGE_NEON_1995:
setDodgeNeon1995EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
@ -1160,23 +1169,15 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case LADA_KALINA:
setLadaKalina(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif /* EFI_SUPPORT_DODGE_NEON */
#if EFI_SUPPORT_FORD_ASPIRE
case FORD_ASPIRE_1996:
setFordAspireEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif /* EFI_SUPPORT_FORD_ASPIRE */
#if EFI_SUPPORT_FORD_FIESTA
case FORD_FIESTA:
setFordFiestaDefaultEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
break;
#endif /* EFI_SUPPORT_FORD_FIESTA */
#if EFI_SUPPORT_NISSAN_PRIMERA
case NISSAN_PRIMERA:
setNissanPrimeraEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif
case HONDA_ACCORD_CD:
setHondaAccordConfigurationThreeWires(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
@ -1216,11 +1217,9 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case MITSU_4G93:
setMitsubishiConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_SUPPORT_1995_FORD_INLINE_6
case FORD_INLINE_6_1995:
setFordInline6(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
case GY6_139QMB:
setGy6139qmbDefaultEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
@ -1269,21 +1268,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case VW_ABA:
setVwAba(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_UNIT_TEST
case TEST_ISSUE_366_BOTH:
setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case TEST_ISSUE_366_RISE:
setTestEngineIssue366rise(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#else
case TEST_ISSUE_366_BOTH:
case TEST_ISSUE_366_RISE:
#endif
case TEST_ENGINE:
setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
case MAZDA_MIATA_2003:
setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
@ -1317,7 +1301,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case TOYOTA_JZS147:
setToyota_jzs147EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#endif // EFI_INCLUDE_ENGINE_PRESETS
default:
warning(CUSTOM_UNEXPECTED_ENGINE_TYPE, "Unexpected engine type: %d", engineType);
}

View File

@ -62,11 +62,10 @@
#define EFI_MAP_AVERAGING TRUE
#define EFI_ALTERNATOR_CONTROL TRUE
#define EFI_SUPPORT_DODGE_NEON TRUE
#define EFI_SUPPORT_FORD_ASPIRE TRUE
#define EFI_SUPPORT_FORD_FIESTA TRUE
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
/**
* Should PnP engine configurations be included in the binary?
*/
#define EFI_INCLUDE_ENGINE_PRESETS TRUE
#define EFI_ENGINE_AUDI_AAN FALSE
#define EFI_ENGINE_SNOW_BLOWER FALSE

View File

@ -47,11 +47,10 @@
#define EFI_CLI_SUPPORT FALSE
#define EFI_SUPPORT_FORD_ASPIRE TRUE
#define EFI_SUPPORT_DODGE_NEON TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
#define EFI_SUPPORT_FORD_FIESTA TRUE
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
/**
* Should PnP engine configurations be included in the binary?
*/
#define EFI_INCLUDE_ENGINE_PRESETS TRUE
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER FALSE
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE