remove cranking dwell angle (#2814)
* config & impl * settings * engines & boards * this test doesn't do anything interesting
This commit is contained in:
parent
12191bfcec
commit
7d2057e74a
|
@ -43,7 +43,6 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now
|
||||
|
|
|
@ -44,7 +44,6 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now
|
||||
|
|
|
@ -44,7 +44,6 @@ static void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 25; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 600;
|
||||
|
||||
engineConfiguration->rpmHardLimit = 8500; // yes, 3k. let's play it safe for now
|
||||
|
|
|
@ -144,8 +144,6 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* that's 1995 config
|
||||
*/
|
||||
|
||||
// set cranking_charge_angle 70
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
// set cranking_timing_angle 0
|
||||
engineConfiguration->crankingTimingAngle = 0;
|
||||
|
||||
|
@ -222,8 +220,6 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
copyTable(config->veTable, veDodgeNeon2003Table);
|
||||
//setMap(config->veTable, 50);
|
||||
|
||||
// set cranking_charge_angle 70
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
// set cranking_timing_angle 710
|
||||
engineConfiguration->crankingTimingAngle = -710;
|
||||
|
||||
|
|
|
@ -24,9 +24,6 @@ void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
// set cranking_charge_angle 30
|
||||
engineConfiguration->crankingChargeAngle = 30;
|
||||
|
||||
//Base engine setting
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
|
||||
|
|
|
@ -81,8 +81,6 @@ void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
setDefaultAspireMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// set_cranking_rpm 550
|
||||
engineConfiguration->cranking.rpm = 550;
|
||||
// set cranking_charge_angle 70
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
// set cranking_timing_angle 37
|
||||
engineConfiguration->crankingTimingAngle = -37;
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@ void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// todo: change to 15?
|
||||
// set cranking_timing_angle 3
|
||||
engineConfiguration->crankingTimingAngle = 3;
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
setLinearCurve(config->ignitionLoadBins, 20, 105, 5);
|
||||
setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -67,9 +67,7 @@ static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE
|
|||
*/
|
||||
setCommonNTCSensor(&engineConfiguration->clt, 1500);
|
||||
setCommonNTCSensor(&engineConfiguration->iat, 1500);
|
||||
|
||||
// set cranking_charge_angle 35
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
// set cranking_timing_angle 0
|
||||
engineConfiguration->crankingTimingAngle = -45;
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// set cranking_timing_angle 15
|
||||
engineConfiguration->crankingTimingAngle = 8;
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 30;
|
||||
|
|
|
@ -109,7 +109,6 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIG
|
|||
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;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 8;
|
||||
|
||||
engineConfiguration->vvtOffset = 97;
|
||||
|
|
|
@ -567,7 +567,6 @@ static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
CONFIG(isSdCardEnabled) = true;
|
||||
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 8;
|
||||
|
||||
engineConfiguration->vvtOffset = 97;
|
||||
|
|
|
@ -35,8 +35,6 @@ void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// set_cranking_rpm 550
|
||||
engineConfiguration->cranking.rpm = 550;
|
||||
// set cranking_charge_angle 70
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
// set cranking_timing_angle 715
|
||||
engineConfiguration->crankingTimingAngle = -715;
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ void setSubaruEG33Defaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injector.flow = 250;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 5; // ???
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
engineConfiguration->cranking.rpm = 400;
|
||||
|
||||
engineConfiguration->rpmHardLimit = 6500;
|
||||
|
|
|
@ -12,10 +12,8 @@ void setDefaultCranking(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->cranking.baseFuel = 27;
|
||||
|
||||
// Ignition
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 6;
|
||||
CONFIG(crankingTimingAngle) = 6;
|
||||
engineConfiguration->crankingChargeAngle = 70;
|
||||
|
||||
// IAC
|
||||
engineConfiguration->crankingIACposition = 50;
|
||||
|
|
|
@ -76,16 +76,6 @@ void setSingleCoilDwell(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->sparkDwellValues[7] = 0;
|
||||
}
|
||||
|
||||
static floatms_t getCrankingSparkDwell(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
if (engineConfiguration->useConstantDwellDuringCranking) {
|
||||
return engineConfiguration->ignitionDwellForCrankingMs;
|
||||
} else {
|
||||
// technically this could be implemented via interpolate2d
|
||||
float angle = engineConfiguration->crankingChargeAngle;
|
||||
return getOneDegreeTimeMs(GET_RPM()) * angle;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Spark dwell time, in milliseconds. 0 if tables are not ready.
|
||||
*/
|
||||
|
@ -93,7 +83,7 @@ floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
|
||||
float dwellMs;
|
||||
if (ENGINE(rpmCalculator).isCranking()) {
|
||||
dwellMs = getCrankingSparkDwell(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
dwellMs = CONFIG(ignitionDwellForCrankingMs);
|
||||
} else {
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(rpm), "invalid rpm", NAN);
|
||||
|
||||
|
|
|
@ -167,12 +167,7 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) {
|
|||
efiPrintf("crankingRpm: %d", engineConfiguration->cranking.rpm);
|
||||
efiPrintf("cranking injection %s", getInjection_mode_e(engineConfiguration->crankingInjectionMode));
|
||||
|
||||
if (engineConfiguration->useConstantDwellDuringCranking) {
|
||||
efiPrintf("ignitionDwellForCrankingMs=%.2f", engineConfiguration->ignitionDwellForCrankingMs);
|
||||
} else {
|
||||
efiPrintf("cranking charge charge angle=%.2f fire at %.2f", engineConfiguration->crankingChargeAngle,
|
||||
engineConfiguration->crankingTimingAngle);
|
||||
}
|
||||
efiPrintf("cranking timing %.2f", engineConfiguration->crankingTimingAngle);
|
||||
|
||||
efiPrintf("=== ignition ===");
|
||||
|
||||
|
@ -462,12 +457,6 @@ static void setToothedWheel(int total, int skipped DECLARE_ENGINE_PARAMETER_SUFF
|
|||
doPrintConfiguration();
|
||||
}
|
||||
|
||||
static void setCrankingChargeAngle(float value) {
|
||||
engineConfiguration->crankingChargeAngle = value;
|
||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
doPrintConfiguration();
|
||||
}
|
||||
|
||||
static void setGlobalFuelCorrection(float value) {
|
||||
if (value < 0.01 || value > 50)
|
||||
return;
|
||||
|
@ -812,8 +801,6 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
|||
CONFIG(enableVerboseCanTx) = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "etb_auto")) {
|
||||
engine->etbAutoTune = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "cranking_constant_dwell")) {
|
||||
engineConfiguration->useConstantDwellDuringCranking = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "cj125")) {
|
||||
engineConfiguration->isCJ125Enabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "cj125verbose")) {
|
||||
|
@ -1007,7 +994,6 @@ const plain_get_float_s getF_plain[] = {
|
|||
{"iat_bias", &engineConfiguration->iat.config.bias_resistor},
|
||||
{"cranking_fuel", &engineConfiguration->cranking.baseFuel},
|
||||
{"cranking_timing_angle", &engineConfiguration->crankingTimingAngle},
|
||||
{"cranking_charge_angle", &engineConfiguration->crankingChargeAngle},
|
||||
};
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
|
@ -1112,7 +1098,6 @@ const command_f_s commandsF[] = {
|
|||
{"cranking_fuel", setCrankingFuel},
|
||||
{"cranking_iac", setCrankingIACExtra},
|
||||
{"cranking_timing_angle", setCrankingTimingAngle},
|
||||
{"cranking_charge_angle", setCrankingChargeAngle},
|
||||
{"tps_accel_threshold", setTpsAccelThr},
|
||||
{"tps_decel_threshold", setTpsDecelThr},
|
||||
{"tps_decel_multiplier", setTpsDecelMult},
|
||||
|
|
|
@ -566,8 +566,8 @@ int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unreal
|
|||
|
||||
cranking_parameters_s cranking
|
||||
float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1
|
||||
float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1
|
||||
float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0
|
||||
float ignitionDwellForCrankingMs;+Dwell duration while cranking;"ms", 1, 0, 0, 200, 1
|
||||
float unused104;;"deg", 1, 0, 0, 3000.0, 0
|
||||
|
||||
|
||||
MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled
|
||||
|
@ -1060,11 +1060,11 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
|
|||
uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0
|
||||
uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0
|
||||
|
||||
bit unusedHereWeHave
|
||||
bit unused1464b0
|
||||
bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling.
|
||||
bit isVerboseIAC;+Print details into rusEfi console\nenable verbose_idle
|
||||
bit isVerboseETB;+Prints ETB details to rusEFI console
|
||||
bit useConstantDwellDuringCranking,"Time-based","Angle-based";+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode.
|
||||
bit unused1464b4
|
||||
bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price
|
||||
bit silentTriggerError;+Sometimes we have a performance issue while printing error
|
||||
bit useLinearCltSensor
|
||||
|
|
|
@ -3071,7 +3071,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
dialog = crankingIgnition, "Ignition"
|
||||
field = "Timing Advance mode", useSeparateAdvanceForCranking
|
||||
field = "Fixed cranking advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0}
|
||||
field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1}
|
||||
field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs
|
||||
|
||||
dialog = postCrankingEnrichment, "After start enrichment"
|
||||
field = "Post-Cranking factor", postCrankingFactor
|
||||
|
@ -3085,8 +3085,6 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "Enable flood clear", isCylinderCleanupEnabled
|
||||
field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled
|
||||
field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking
|
||||
field = "Dwell Duration Mode", useConstantDwellDuringCranking
|
||||
field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0}
|
||||
|
||||
; Cranking->Cranking Settings
|
||||
dialog = crankingDialog, "Cranking Settings"
|
||||
|
|
|
@ -216,12 +216,8 @@ TEST(misc, testFordAspire) {
|
|||
|
||||
ASSERT_EQ( 4, TRIGGER_WAVEFORM(getTriggerWaveformSynchPointIndex())) << "getTriggerWaveformSynchPointIndex";
|
||||
|
||||
engineConfiguration->crankingChargeAngle = 65;
|
||||
engineConfiguration->crankingTimingAngle = 31;
|
||||
engineConfiguration->useConstantDwellDuringCranking = false;
|
||||
|
||||
engine->rpmCalculator.setRpmValue(200);
|
||||
assertEqualsM("cranking dwell", 54.166670, getSparkDwell(200 PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
int rpm = 2000;
|
||||
engine->rpmCalculator.setRpmValue(rpm);
|
||||
ASSERT_EQ( 4, getSparkDwell(rpm PASS_ENGINE_PARAMETER_SUFFIX)) << "running dwell";
|
||||
|
|
Loading…
Reference in New Issue