goodbye ignitionOffset (#2503)
* remove * set the timing map to do what the offset used to do Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
5b0a1eef7e
commit
8b3aa6c40d
|
@ -152,8 +152,6 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// set global_trigger_offset_angle 497
|
||||
engineConfiguration->globalTriggerAngleOffset = 497;
|
||||
// set ignition_offset 350
|
||||
engineConfiguration->ignitionOffset = 350;
|
||||
// set injection_offset 510
|
||||
engineConfiguration->extraInjectionOffset = 510 + 497;
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->trigger.customSkippedToothCount = 0;
|
||||
|
||||
engineConfiguration->globalTriggerAngleOffset = 0;
|
||||
engineConfiguration->ignitionOffset = 13;
|
||||
engineConfiguration->extraInjectionOffset = 207.269999;
|
||||
|
||||
engineConfiguration->clt.config = {-10, 60, 120, 160310, 7700, 1180, 2700};
|
||||
|
|
|
@ -76,7 +76,6 @@ void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
engineConfiguration->ignitionOffset = 87;
|
||||
engineConfiguration->extraInjectionOffset = 54 + 360;
|
||||
|
||||
setDefaultAspireMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -192,7 +192,6 @@ angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
}
|
||||
|
||||
angle -= engineConfiguration->ignitionOffset;
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "_AngleN5", 0);
|
||||
fixAngle(angle, "getAdvance", CUSTOM_ERR_ADCANCE_CALC_ANGLE);
|
||||
return angle;
|
||||
|
|
|
@ -923,7 +923,6 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
engineConfiguration->globalTriggerAngleOffset = 0;
|
||||
engineConfiguration->extraInjectionOffset = 0;
|
||||
engineConfiguration->ignitionOffset = 0;
|
||||
engineConfiguration->sensorChartFrequency = 20;
|
||||
|
||||
engineConfiguration->fuelAlgorithm = LM_SPEED_DENSITY;
|
||||
|
|
|
@ -185,7 +185,6 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) {
|
|||
if (engineConfiguration->timingMode == TM_FIXED) {
|
||||
scheduleMsg(&logger, "fixedModeTiming: %d", (int) engineConfiguration->fixedModeTiming);
|
||||
}
|
||||
scheduleMsg(&logger, "ignitionOffset=%.2f", engineConfiguration->ignitionOffset);
|
||||
|
||||
scheduleMsg(&logger, "=== injection ===");
|
||||
scheduleMsg(&logger, "injection %s offset=%.2f/enabled=%s", getInjection_mode_e(engineConfiguration->injectionMode),
|
||||
|
@ -278,12 +277,6 @@ static void setInjectionOffset(float value) {
|
|||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
static void setIgnitionOffset(float value) {
|
||||
engineConfiguration->ignitionOffset = value;
|
||||
doPrintConfiguration();
|
||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
static void setFuelPumpPinMode(int value) {
|
||||
engineConfiguration->fuelPumpPinMode = (pin_output_mode_e) value;
|
||||
doPrintConfiguration();
|
||||
|
@ -1010,7 +1003,6 @@ const plain_get_float_s getF_plain[] = {
|
|||
{"adcVcc", &engineConfiguration->adcVcc},
|
||||
{"cranking_dwell", &engineConfiguration->ignitionDwellForCrankingMs},
|
||||
{"idle_position", &engineConfiguration->manIdlePosition},
|
||||
{"ignition_offset", &engineConfiguration->ignitionOffset},
|
||||
{"injection_offset", &engineConfiguration->extraInjectionOffset},
|
||||
{"global_trigger_offset_angle", &engineConfiguration->globalTriggerAngleOffset},
|
||||
{"global_fuel_correction", &engineConfiguration->globalFuelCorrection},
|
||||
|
@ -1118,7 +1110,6 @@ const command_f_s commandsF[] = {
|
|||
{MOCK_MAP_COMMAND, setMockMapVoltage},
|
||||
{MOCK_CLT_COMMAND, setMockCltVoltage},
|
||||
#endif // EFI_ENABLE_MOCK_ADC
|
||||
{"ignition_offset", setIgnitionOffset},
|
||||
{"injection_offset", setInjectionOffset},
|
||||
{"global_trigger_offset_angle", setGlobalTriggerAngleOffset},
|
||||
{"global_fuel_correction", setGlobalFuelCorrection},
|
||||
|
|
|
@ -603,7 +603,7 @@ angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking,
|
|||
custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "Single Coil", "Individual Coils", "Wasted Spark", "Two Distributors"
|
||||
ignition_mode_e ignitionMode;+"Single Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted Spark" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X
|
||||
|
||||
angle_t ignitionOffset;+This value could be used to offset the whole ignition timing table by a constant\nSee also timing_offset_cylinder;"RPM", 1, 0, 0, 3000.0, 0
|
||||
float unusedOldIgnitionOffset;;"unused",1,0,0,1,0
|
||||
|
||||
custom timing_mode_e 4 bits, U32, @OFFSET@, [0:0], "dynamic", "fixed"
|
||||
timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing with a timing light).
|
||||
|
|
|
@ -152,6 +152,7 @@ TEST(misc, test1995FordInline6TriggerDecoder) {
|
|||
ASSERT_EQ( 0, getTriggerZeroEventIndex(FORD_INLINE_6_1995)) << "triggerIndex ";
|
||||
|
||||
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995);
|
||||
setWholeTimingTable(-13);
|
||||
|
||||
Sensor::setMockValue(SensorType::Iat, 49.579071f);
|
||||
|
||||
|
@ -314,6 +315,8 @@ TEST(misc, testRpmCalculator) {
|
|||
|
||||
efiAssertVoid(CUSTOM_ERR_6670, engineConfiguration!=NULL, "null config in engine");
|
||||
|
||||
setWholeTimingTable(-13);
|
||||
|
||||
engineConfiguration->trigger.customTotalToothCount = 8;
|
||||
engineConfiguration->globalFuelCorrection = 3;
|
||||
eth.applyTriggerWaveform();
|
||||
|
@ -347,6 +350,8 @@ TEST(misc, testRpmCalculator) {
|
|||
|
||||
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
ASSERT_NEAR(engine->engineState.timingAdvance, 707, 0.1f);
|
||||
|
||||
assertEqualsM("fuel #1", 4.5450, engine->injectionDuration);
|
||||
InjectionEvent *ie0 = &engine->injectionEvents.elements[0];
|
||||
assertEqualsM("injection angle", 31.365, ie0->injectionStart.angleOffsetFromTriggerEvent);
|
||||
|
|
Loading…
Reference in New Issue