auto-sync

This commit is contained in:
rusEfi 2016-02-07 22:04:14 -05:00
parent a48a63825a
commit f6223df68f
8 changed files with 52 additions and 32 deletions

View File

@ -236,6 +236,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setFrankenso0_1_joystick(engineConfiguration);
// boardConfiguration->useWarmupPidAfr = true;
engineConfiguration->warmupAfrPid.pFactor = -0.2;
engineConfiguration->warmupAfrPid.dFactor = -0.02;
// set_global_trigger_offset_angle 38
engineConfiguration->globalTriggerAngleOffset = 38;

View File

@ -259,8 +259,6 @@ static void printState(void) {
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
float baseFuel = getBaseFuel(rpm PASS_ENGINE_PARAMETER);
debugFloat(&logger, "fuel_base", baseFuel, 2);
// debugFloat(&logger, "fuel_iat", getIatCorrection(getIntakeAirTemperature()), 2);
// debugFloat(&logger, "fuel_clt", getCltCorrection(getCoolantTemperature()), 2);
debugFloat(&logger, "fuel_lag", engine->engineState.injectorLag, 2);
debugFloat(&logger, "fuel", ENGINE(actualLastInjection), 2);

View File

@ -91,7 +91,7 @@ void Engine::addConfigurationListener(configuration_callback_t callback) {
Engine::Engine(persistent_config_s *config) {
init(config);
engineState.warmupAfrPid.init(&config->engineConfiguration.warmupAfrPid, 0.1, 10);
engineState.warmupAfrPid.init(&config->engineConfiguration.warmupAfrPid, -0.8, 10);
isEngineChartEnabled = false;
sensorChartMode = SC_OFF;
/**

View File

@ -439,6 +439,9 @@ static void printTemperatureInfo(void) {
scheduleMsg(&logger, "A/C relay=%s @ %s", boolToString(enginePins.acRelay.getLogicValue()),
hwPortname(boardConfiguration->acRelayPin));
scheduleMsg(&logger, "warmupPID=%d corr=%f", boardConfiguration->useWarmupPidAfr,
engine->engineState.cltFuelCorrection);
#endif
}

View File

@ -70,10 +70,10 @@ custom baro_corr_table_t 64 array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO
custom ignition_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, -720, 720, 2
struct pid_s
float pFactor;;"value", 1, 0, 0, 1000, 2
float iFactor;;"value", 1, 0, 0, 1000, 2
float dFactor;;"value", 1, 0, 0, 1000, 2
float offset;Linear addition to PID logic;"value", 1, 0, 0, 1000, 2
float pFactor;;"value", 1, 0, 0, 1000, 3
float iFactor;;"value", 1, 0, 0, 1000, 3
float dFactor;;"value", 1, 0, 0, 1000, 3
float offset;Linear addition to PID logic;"value", 1, 0, 0, 1000, 3
end_struct
struct cranking_parameters_s

View File

@ -41,7 +41,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 Sat Feb 06 08:58:48 EST 2016
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 07 21:17:35 EST 2016
pageSize = 16088
page = 1
@ -480,10 +480,10 @@ page = 1
mapErrorDetectionTooLow = scalar, F32, 1888, "kPa", 1, 0, -100.0, 100.0, 2
mapErrorDetectionTooHigh = scalar, F32, 1892, "kPa", 1, 0, -100.0, 800.0, 2
step1RpmWindow = scalar, S32, 1896, "rpm", 1, 0, 0, 3000.0, 2
idleRpmPid_pFactor = scalar, F32, 1900, "value", 1, 0, 0, 1000, 2
idleRpmPid_iFactor = scalar, F32, 1904, "value", 1, 0, 0, 1000, 2
idleRpmPid_dFactor = scalar, F32, 1908, "value", 1, 0, 0, 1000, 2
idleRpmPid_offset = scalar, F32, 1912, "value", 1, 0, 0, 1000, 2
idleRpmPid_pFactor = scalar, F32, 1900, "value", 1, 0, 0, 1000, 3
idleRpmPid_iFactor = scalar, F32, 1904, "value", 1, 0, 0, 1000, 3
idleRpmPid_dFactor = scalar, F32, 1908, "value", 1, 0, 0, 1000, 3
idleRpmPid_offset = scalar, F32, 1912, "value", 1, 0, 0, 1000, 3
;skipping idleDT offset 1916
;skipping idleControl offset 1920
communicationPin = bits, U32, 1924, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
@ -494,19 +494,19 @@ page = 1
consoleSerialRxPin = bits, U32, 1944, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
knockNoise = array, F32, 1948, [8], "v", 1, 0, 0.0, 10, 2
knockNoiseRpmBins = array, F32, 1980, [8], "RPM", 1, 0, 0.0, 18000, 2
etb_pFactor = scalar, F32, 2012, "value", 1, 0, 0, 1000, 2
etb_iFactor = scalar, F32, 2016, "value", 1, 0, 0, 1000, 2
etb_dFactor = scalar, F32, 2020, "value", 1, 0, 0, 1000, 2
etb_offset = scalar, F32, 2024, "value", 1, 0, 0, 1000, 2
etb_pFactor = scalar, F32, 2012, "value", 1, 0, 0, 1000, 3
etb_iFactor = scalar, F32, 2016, "value", 1, 0, 0, 1000, 3
etb_dFactor = scalar, F32, 2020, "value", 1, 0, 0, 1000, 3
etb_offset = scalar, F32, 2024, "value", 1, 0, 0, 1000, 3
cltIdleRpmBins = array, F32, 2028, [16], "C", 1, 0, -100.0, 250.0, 2
cltIdleRpm = array, F32, 2092, [16], "RPM", 1, 0, 0.0, 400.0, 0
targetVBatt = scalar, F32, 2156, "Volts", 1, 0, 0,30, 1
alternatorOffAboveTps = scalar, F32, 2160, "%", 1, 0, 0, 200, 2
alternatorDT = scalar, S32, 2164, "ms", 1, 0, 0, 3000, 0
alternatorControl_pFactor = scalar, F32, 2168, "value", 1, 0, 0, 1000, 2
alternatorControl_iFactor = scalar, F32, 2172, "value", 1, 0, 0, 1000, 2
alternatorControl_dFactor = scalar, F32, 2176, "value", 1, 0, 0, 1000, 2
alternatorControl_offset = scalar, F32, 2180, "value", 1, 0, 0, 1000, 2
alternatorControl_pFactor = scalar, F32, 2168, "value", 1, 0, 0, 1000, 3
alternatorControl_iFactor = scalar, F32, 2172, "value", 1, 0, 0, 1000, 3
alternatorControl_dFactor = scalar, F32, 2176, "value", 1, 0, 0, 1000, 3
alternatorControl_offset = scalar, F32, 2180, "value", 1, 0, 0, 1000, 3
tpsAccelLength = scalar, S32, 2184, "cycles", 1, 0, 1, 200, 0
tpsAccelEnrichmentThreshold = scalar, F32, 2188, "roc", 1, 0, 0, 200, 3
tpsAccelEnrichmentMultiplier = scalar, F32, 2192, "coeff", 1, 0, 0, 200, 3
@ -522,11 +522,11 @@ 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:1], "ALTERNATOR", "TPS_ACCEL", "mode2", "mode3"
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 2
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 2
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 2
warmupAfrPid_offset = scalar, F32, 2260, "value", 1, 0, 0, 1000, 2
debugMode = bits, U32, 2244, [0:1], "ALTERNATOR", "TPS_ACCEL", "WARMUP_PID", "mode3"
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 3
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 3
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 3
warmupAfrPid_offset = scalar, F32, 2260, "value", 1, 0, 0, 1000, 3
;skipping unused offset 2264
le_formulas1 = array, U08, 3016, [200],"char", 1, 0, 0.0, 3.0, 2
le_formulas2 = array, U08, 3216, [200],"char", 1, 0, 0.0, 3.0, 2
@ -1041,12 +1041,14 @@ fileVersion = { 20160122 }
entry = wallFuelAmount, "fuel: wall amount", float, "%.3f"
entry = baroCorrection, "baroCorrection",float,"%.3f"
entry = cltCorrection, "cltCorrection", float,"%.3f"
entry = debugFloatField1, "debug f1",float,"%.3f"
entry = debugFloatField2, "debug f2",float,"%.3f"
entry = debugFloatField3, "debug f3",float,"%.3f"
entry = debugFloatField4, "debug f4",float,"%.3f"
entry = debugFloatField5, "debug f5",float,"%.3f"
entry = debugFloatField1, "debug f1",float,"%.4f"
entry = debugFloatField2, "debug f2",float,"%.4f"
entry = debugFloatField3, "debug f3",float,"%.4f"
entry = debugFloatField4, "debug f4",float,"%.4f"
entry = debugFloatField5, "debug f5",float,"%.4f"
entry = debugIntField1, "debug i1",int,"%d"
entry = debugIntField2, "debug i2",int,"%d"
entry = debugIntField3, "debug i3",int,"%d"

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Feb 06 08:58:48 EST 2016
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 07 21:17:35 EST 2016
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int TS_FILE_VERSION = 20160122;
@ -1271,7 +1271,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", "TPS_ACCEL", "mode2", "mode3"};
public static final String[] debug_mode_e = {"ALTERNATOR", "TPS_ACCEL", "WARMUP_PID", "mode3"};
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);

View File

@ -44,6 +44,8 @@ public class FuelTunePane {
private final Table3D veTable = new Table3D();
private final Table3D changeMap = new Table3D();
private final JButton upload = new JButton("Upload");
private final JCheckBox collect = new JCheckBox("enable");
private final JButton clean = new JButton("clear");
private byte[] newVeMap;
public FuelTunePane() {
@ -68,8 +70,19 @@ public class FuelTunePane {
UploadChanges.scheduleUpload(ci);
}
});
clean.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
synchronized (incomingDataPoints) {
incomingDataPoints.clear();
}
}
});
collect.setSelected(true);
JPanel topPanel = new JPanel(new FlowLayout());
topPanel.add(collect);
topPanel.add(clean);
topPanel.add(incomingBufferSize);
topPanel.add(runLogic);
topPanel.add(upload);
@ -166,6 +179,8 @@ public class FuelTunePane {
sc.addListener(Sensor.RPM, new SensorCentral.SensorListener() {
@Override
public void onSensorUpdate(double value) {
if (!collect.isSelected())
return;
int rpm = (int) value;
double engineLoad = sc.getValue(Sensor.MAP);
double afr = sc.getValue(Sensor.AFR);