auto-sync

This commit is contained in:
rusEfi 2016-12-06 23:03:39 -05:00
parent c2c258dcb2
commit dd72915fba
8 changed files with 28 additions and 7 deletions

View File

@ -129,13 +129,14 @@ EngineState::EngineState() {
injectorLag = 0;
warningCounter = 0;
lastErrorCode = 0;
crankingTime = 0;
targetAFR = 0;
tpsAccelEnrich = 0;
tChargeK = 0;
runningFuel = baseFuel = currentVE = 0;
timeOfPreviousWarning = -10;
baseTableFuel = iat = iatFuelCorrection = 0;
clt = cltFuelCorrection = 0;
clt = cltFuelCorrection = postCrankingFuelCorrection = 0;
warmupTargetAfr = airMass = 0;
baroCorrection = timingAdvance = fuelTankGauge = 0;
sparkDwell = mapAveragingDuration = 0;
@ -153,6 +154,13 @@ void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_F) {
void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
int rpm = ENGINE(rpmCalculator.rpmValue);
efitick_t nowNt = getTimeNowNt();
if (isCrankingR(rpm)) {
crankingTime = nowNt;
} else {
timeSinceCranking = nowNt - crankingTime;
}
sparkDwell = getSparkDwell(rpm PASS_ENGINE_PARAMETER);
dwellAngle = sparkDwell / getOneDegreeTimeMs(rpm);

View File

@ -109,6 +109,9 @@ public:
float iat;
float clt;
efitick_t crankingTime;
efitick_t timeSinceCranking;
int warningCounter;
int lastErrorCode;
efitimesec_t timeOfPreviousWarning;
@ -143,6 +146,7 @@ public:
// fuel-related;
float iatFuelCorrection;
float cltFuelCorrection;
float postCrankingFuelCorrection;
/**
* Global injector lag + injectorLag(VBatt)
*

View File

@ -362,6 +362,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->acCutoffLowRpm = 700;
engineConfiguration->acCutoffHighRpm = 5000;
engineConfiguration->postCrankingTargetClt = 25;
engineConfiguration->postCrankingDurationSec = 2;
initTemperatureCurve(IAT_CURVE_SIZE, config->iatFuelCorrBins, config->iatFuelCorr, 1);
engineConfiguration->tachPulseDuractionMs = 4;

View File

@ -649,7 +649,7 @@ typedef enum {
FSIO_ADC = 6,
AUX_PID_1 = 7,
DBG_VVT = 8,
DM_9 = 9,
DBG_POST_CRANKING_ENRICH = 9,
DM_10 = 10,
DM_11 = 11,
DM_12 = 12,

View File

@ -109,7 +109,7 @@ float baseFuel;+Fuel squirt duration while cranking\nA number of curves adjust t
int16_t rpm;+Cranking mode threshold. Special cranking logic controls fuel and spark while RPM is below this threshold\nset_cranking_rpm X;"RPM", 1, 0, 0, 3000, 0
end_struct
#define debug_mode_e_enum "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
#define debug_mode_e_enum "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "post-crank enrich", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:3], @@debug_mode_e_enum@@
#define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7"

View File

@ -42,7 +42,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 06 21:51:50 EST 2016
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 06 22:04:27 EST 2016
pageSize = 16376
page = 1
@ -554,7 +554,7 @@ page = 1
tpsDecelEnleanmentThreshold = scalar, F32, 2232, "roc", 1, 0, 0, 200, 3
tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3
slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3
debugMode = bits, U32, 2244, [0:3], "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
debugMode = bits, U32, 2244, [0:3], "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "post-crank enrich", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 5
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 5
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 5
@ -1950,6 +1950,9 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
field = ""
field = ""
field = "enable Cylinder Cleanup", isCylinderCleanupEnabled
field = "Post-Cranking target (C)", postCrankingTargetClt
field = "Post-Cranking factor", postCrankingFactor
field = "Post-Cranking duraction", postCrankingDurationSec
dialog = EngineLoadAccelPanel, "Engine Load"

View File

@ -1910,6 +1910,9 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
field = ""
field = ""
field = "enable Cylinder Cleanup", isCylinderCleanupEnabled
field = "Post-Cranking target (C)", postCrankingTargetClt
field = "Post-Cranking factor", postCrankingFactor
field = "Post-Cranking duraction", postCrankingDurationSec
dialog = EngineLoadAccelPanel, "Engine Load"

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 06 21:51:50 EST 2016
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Dec 06 22:04:27 EST 2016
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int FSIO_ADC_COUNT = 4;
@ -1474,7 +1474,7 @@ public class Fields {
public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2232, FieldType.FLOAT);
public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2236, FieldType.FLOAT);
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2240, FieldType.FLOAT);
public static final String[] debug_mode_e = {"Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "mode9", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"};
public static final String[] debug_mode_e = {"Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "post-crank enrich", "mode10", "mode11", "mode12", "mode13", "mode14", "mode15"};
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2244, FieldType.INT, debug_mode_e);
public static final Field WARMUPAFRPID_PFACTOR = Field.create("WARMUPAFRPID_PFACTOR", 2248, FieldType.FLOAT);
public static final Field WARMUPAFRPID_IFACTOR = Field.create("WARMUPAFRPID_IFACTOR", 2252, FieldType.FLOAT);