goodbye plain maf
This commit is contained in:
parent
50aad7496f
commit
67e4fcb2a2
|
@ -589,8 +589,6 @@ case Force_4_bytes_size_engine_load_mode:
|
|||
return "Force_4_bytes_size_engine_load_mode";
|
||||
case LM_ALPHA_N:
|
||||
return "LM_ALPHA_N";
|
||||
case LM_PLAIN_MAF:
|
||||
return "LM_PLAIN_MAF";
|
||||
case LM_REAL_MAF:
|
||||
return "LM_REAL_MAF";
|
||||
case LM_SPEED_DENSITY:
|
||||
|
|
|
@ -80,9 +80,7 @@ void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->globalFuelCorrection = 0.75;
|
||||
engineConfiguration->specs.displacement = 1.839;
|
||||
// engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||
|
||||
setFuelLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -291,7 +291,6 @@ void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNA6_MAP_Frankenso(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||
|
||||
/**
|
||||
* Stage 0 we only have OEM TPS switch
|
||||
|
@ -349,6 +348,5 @@ void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
setMiataNA6_settings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNAcommonEngineSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
|
|
@ -727,8 +727,6 @@ case Force_4_bytes_size_engine_load_mode:
|
|||
return "Force_4_bytes_size_engine_load_mode";
|
||||
case LM_ALPHA_N:
|
||||
return "LM_ALPHA_N";
|
||||
case LM_PLAIN_MAF:
|
||||
return "LM_PLAIN_MAF";
|
||||
case LM_REAL_MAF:
|
||||
return "LM_REAL_MAF";
|
||||
case LM_SPEED_DENSITY:
|
||||
|
|
|
@ -979,7 +979,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionOffset = 0;
|
||||
engineConfiguration->sensorChartFrequency = 20;
|
||||
|
||||
engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||
engineConfiguration->fuelAlgorithm = LM_SPEED_DENSITY;
|
||||
|
||||
engineConfiguration->vbattDividerCoeff = ((float) (15 + 65)) / 15;
|
||||
|
||||
|
|
|
@ -424,10 +424,6 @@ typedef enum {
|
|||
* This enum is used to select your desired Engine Load calculation algorithm
|
||||
*/
|
||||
typedef enum {
|
||||
/**
|
||||
* raw Mass Air Flow sensor value algorithm. http://en.wikipedia.org/wiki/Mass_flow_sensor
|
||||
*/
|
||||
LM_PLAIN_MAF = 0,
|
||||
/**
|
||||
* Throttle Position Sensor value is used as engine load. http://en.wikipedia.org/wiki/Throttle_position_sensor
|
||||
*/
|
||||
|
|
|
@ -65,13 +65,6 @@ float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
efiAssert(CUSTOM_ERR_ASSERT, engine!=NULL, "engine 2NULL", NAN);
|
||||
efiAssert(CUSTOM_ERR_ASSERT, engineConfiguration!=NULL, "engineConfiguration 2NULL", NAN);
|
||||
switch (engineConfiguration->fuelAlgorithm) {
|
||||
case LM_PLAIN_MAF:
|
||||
if (!hasMafSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
// todo: make this not happen during hardware CI
|
||||
warning(CUSTOM_MAF_NEEDED, "MAF sensor needed for current fuel algorithm");
|
||||
return NAN;
|
||||
}
|
||||
return getMafVoltage(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
case LM_SPEED_DENSITY:
|
||||
return getMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
case LM_ALPHA_N:
|
||||
|
@ -80,7 +73,7 @@ float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
return getRealMaf(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
default:
|
||||
firmwareError(CUSTOM_UNKNOWN_ALGORITHM, "Unexpected engine load parameter: %d", engineConfiguration->fuelAlgorithm);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM",
|
|||
int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2
|
||||
|
||||
|
||||
#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID"
|
||||
#define engine_load_mode_e_enum "INVALID", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID"
|
||||
|
||||
|
||||
custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@
|
||||
|
|
|
@ -354,7 +354,6 @@ enable2ndByteCanID = false
|
|||
;
|
||||
|
||||
; todo: generate this section programatically
|
||||
LM_PLAIN_MAF = {0},
|
||||
LM_ALPHA_N = {1},
|
||||
LM_SPEED_DENSITY = {3},
|
||||
LM_REAL_MAF = {4}
|
||||
|
@ -706,16 +705,6 @@ enable2ndByteCanID = false
|
|||
[TableEditor]
|
||||
; table_id, map3d_id, "title", page
|
||||
|
||||
table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1
|
||||
topicHelp = "fuelHelp"
|
||||
; constant, variable
|
||||
xBins = fuelRpmBins, RPMValue
|
||||
yBins = fuelLoadBins, MAFValue
|
||||
zBins = fuelTable
|
||||
; gridHeight = 2.0
|
||||
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
|
||||
upDownLabel = "(RICHER)", "(LEANER)"
|
||||
|
||||
table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1
|
||||
topicHelp = "fuelHelp"
|
||||
; constant, variable
|
||||
|
@ -1514,7 +1503,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
|
||||
[UserDefined]
|
||||
dialog = fuelTableBottomDialog, "", card
|
||||
panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF}
|
||||
panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N}
|
||||
panel = fuelTableELTbl, Center
|
||||
|
||||
|
|
Loading…
Reference in New Issue