convert cranking defaults to mg (#1921)
* convert cranking defaults to mg * fix tests
This commit is contained in:
parent
a51b68bbed
commit
cf3dc9c2c3
|
@ -42,7 +42,7 @@ void setBoardConfigurationOverrides(void) {
|
|||
engineConfiguration->specs.displacement = 1.645;
|
||||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 5; // ???
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ void setBoardConfigurationOverrides(void) {
|
|||
engineConfiguration->specs.displacement = 1.645;
|
||||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 5; // ???
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->specs.displacement = 1.645;
|
||||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 5; // ???
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionMode = IM_TWO_COILS;
|
||||
|
||||
// set cranking_fuel 15
|
||||
engineConfiguration->cranking.baseFuel = 15;
|
||||
engineConfiguration->cranking.baseFuel = 30;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// this large engine seems to crank at around only 150 RPM? And happily idle at 400RPM?
|
||||
engineConfiguration->cranking.rpm = 280;
|
||||
|
||||
CONFIG(crankingTimingAngle) = 15;
|
||||
CONFIG(crankingTimingAngle) = 30;
|
||||
|
||||
// I am too lazy to add MAP sensor
|
||||
engineConfiguration->fuelAlgorithm = LM_ALPHA_N_2;
|
||||
|
|
|
@ -54,7 +54,7 @@ void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 2.5;
|
||||
engineConfiguration->cranking.baseFuel = 30;
|
||||
|
||||
engineConfiguration->rpmHardLimit = 7400;
|
||||
|
||||
|
|
|
@ -75,13 +75,6 @@ static const ignition_table_t miataNA8_maf_advance_table = { {/*0 engineLoad=1.
|
|||
+29.712, /*12 5760.0*/+28.651, /*13 6173.0*/+28.045, /*14 6586.0*/+27.228, /*15 7000.0*/+27.784 } };
|
||||
#endif
|
||||
|
||||
static void setDefaultCrankingFuel(engine_configuration_s *engineConfiguration) {
|
||||
// todo: set cranking parameters method based on injectors and displacement?
|
||||
|
||||
// set cranking_fuel 5
|
||||
engineConfiguration->cranking.baseFuel = 5;
|
||||
}
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
|
@ -108,7 +101,7 @@ static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
||||
setDefaultCrankingFuel(engineConfiguration);
|
||||
engineConfiguration->cranking.baseFuel = 24;
|
||||
|
||||
engineConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||
engineConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
|
||||
|
|
|
@ -220,25 +220,23 @@ static void setMiataNA6_settings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// chartsize 200
|
||||
engineConfiguration->engineChartSize = 200;
|
||||
|
||||
// maybe adjust CLT correction?
|
||||
// set cranking_fuel 8
|
||||
engineConfiguration->cranking.baseFuel = 1;
|
||||
config->crankingFuelCoef[0] = 28; // base cranking fuel adjustment coefficient
|
||||
engineConfiguration->cranking.baseFuel = 24;
|
||||
config->crankingFuelCoef[0] = 2.8; // base cranking fuel adjustment coefficient
|
||||
config->crankingFuelBins[0] = -20; // temperature in C
|
||||
config->crankingFuelCoef[1] = 22;
|
||||
config->crankingFuelCoef[1] = 2.2;
|
||||
config->crankingFuelBins[1] = -10;
|
||||
config->crankingFuelCoef[2] = 18;
|
||||
config->crankingFuelCoef[2] = 1.8;
|
||||
config->crankingFuelBins[2] = 5;
|
||||
config->crankingFuelCoef[3] = 15;
|
||||
config->crankingFuelCoef[3] = 1.5;
|
||||
config->crankingFuelBins[3] = 30;
|
||||
|
||||
config->crankingFuelCoef[4] = 10;
|
||||
config->crankingFuelCoef[4] = 1.0;
|
||||
config->crankingFuelBins[4] = 35;
|
||||
config->crankingFuelCoef[5] = 10;
|
||||
config->crankingFuelCoef[5] = 1.0;
|
||||
config->crankingFuelBins[5] = 50;
|
||||
config->crankingFuelCoef[6] = 10;
|
||||
config->crankingFuelCoef[6] = 1.0;
|
||||
config->crankingFuelBins[6] = 65;
|
||||
config->crankingFuelCoef[7] = 10;
|
||||
config->crankingFuelCoef[7] = 1.0;
|
||||
config->crankingFuelBins[7] = 90;
|
||||
|
||||
engineConfiguration->specs.displacement = 1.6;
|
||||
|
|
|
@ -110,9 +110,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIG
|
|||
|
||||
setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 9; // higher value for return system NA conversion since lower fuel pressure
|
||||
engineConfiguration->cranking.baseFuel = 27; // higher value for return system NA conversion since lower fuel pressure
|
||||
engineConfiguration->vbattDividerCoeff = 9.30; // actual value on my new board
|
||||
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
|
|
|
@ -419,7 +419,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// set cranking_timing_angle 10
|
||||
engineConfiguration->crankingTimingAngle = 10;
|
||||
// set cranking_fuel 4
|
||||
engineConfiguration->cranking.baseFuel = 4; // this value for return-less NB miata fuel system, higher pressure
|
||||
engineConfiguration->cranking.baseFuel = 27; // this value for return-less NB miata fuel system, higher pressure
|
||||
|
||||
/**
|
||||
* Saab attempt
|
||||
|
@ -531,25 +531,23 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->etb.minValue = -60;
|
||||
engineConfiguration->etb.maxValue = 50;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 1;
|
||||
config->crankingFuelCoef[0] = 28; // base cranking fuel adjustment coefficient
|
||||
config->crankingFuelCoef[0] = 2.8; // base cranking fuel adjustment coefficient
|
||||
config->crankingFuelBins[0] = -20; // temperature in C
|
||||
config->crankingFuelCoef[1] = 22;
|
||||
config->crankingFuelCoef[1] = 2.2;
|
||||
config->crankingFuelBins[1] = -10;
|
||||
config->crankingFuelCoef[2] = 18;
|
||||
config->crankingFuelCoef[2] = 1.8;
|
||||
config->crankingFuelBins[2] = 5;
|
||||
config->crankingFuelCoef[3] = 15;
|
||||
config->crankingFuelCoef[3] = 1.5;
|
||||
config->crankingFuelBins[3] = 30;
|
||||
|
||||
config->crankingFuelCoef[4] = 10;
|
||||
config->crankingFuelCoef[4] = 1.0;
|
||||
config->crankingFuelBins[4] = 35;
|
||||
config->crankingFuelCoef[5] = 10;
|
||||
config->crankingFuelCoef[5] = 1.0;
|
||||
config->crankingFuelBins[5] = 50;
|
||||
config->crankingFuelCoef[6] = 10;
|
||||
config->crankingFuelCoef[6] = 1.0;
|
||||
config->crankingFuelBins[6] = 65;
|
||||
config->crankingFuelCoef[7] = 10;
|
||||
config->crankingFuelCoef[7] = 1.0;
|
||||
config->crankingFuelBins[7] = 90;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -600,9 +598,6 @@ static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
CONFIG(isSdCardEnabled) = true;
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 9; // higher value for return system NA conversion since lower fuel pressure
|
||||
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 8;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injectionPinMode = OM_OPENDRAIN_INVERTED;
|
||||
engineConfiguration->isCylinderCleanupEnabled = true;
|
||||
engineConfiguration->rpmHardLimit = 8000;
|
||||
engineConfiguration->cranking.baseFuel = 4;
|
||||
engineConfiguration->cranking.baseFuel = 28;
|
||||
|
||||
|
||||
//Analog Inputs
|
||||
|
|
|
@ -905,7 +905,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
* Cranking defaults
|
||||
*/
|
||||
engineConfiguration->startUpFuelPumpDuration = 4;
|
||||
engineConfiguration->cranking.baseFuel = 12;
|
||||
engineConfiguration->cranking.baseFuel = 27;
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
TEST(engine, testPlainCrankingWithoutAdvancedFeatures) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 12;
|
||||
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
ASSERT_EQ( 0, GET_RPM()) << "RPM=0";
|
||||
|
||||
|
|
|
@ -8,11 +8,10 @@
|
|||
#include "engine_test_helper.h"
|
||||
|
||||
TEST(cranking, testFasterEngineSpinningUp) {
|
||||
printf("*************************************************** testFasterEngineSpinningUp\r\n");
|
||||
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
// turn on FasterEngineSpinUp mode
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->cranking.baseFuel = 12;
|
||||
|
||||
// set ignition mode
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
|
Loading…
Reference in New Issue