Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
68ae5b3028
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 22:26:05 EDT 2017
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 03 21:10:42 EDT 2017
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -2057,4 +2057,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 22:26:05 EDT 2017
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 03 21:10:42 EDT 2017
|
||||
|
|
|
@ -1495,3 +1495,4 @@
|
|||
#define GAUGE_NAME_FUEL_EL_EXTRA "fuel: engine load acceleration extra fuel"
|
||||
#define GAUGE_NAME_FUEL_INJ_DUTY "fuel: injector duty cycle"
|
||||
#define GAUGE_NAME_DWELL_DUTY "dwell: coil duty cycle"
|
||||
#define GAUGE_COIL_DWELL_TIME "dwell: coil charge time"
|
||||
|
|
|
@ -870,4 +870,6 @@ end_struct
|
|||
#define GAUGE_NAME_FUEL_INJ_DUTY "fuel: injector duty cycle"
|
||||
|
||||
|
||||
#define GAUGE_NAME_DWELL_DUTY "dwell: coil duty cycle"
|
||||
#define GAUGE_NAME_DWELL_DUTY "dwell: coil duty cycle"
|
||||
|
||||
#define GAUGE_COIL_DWELL_TIME "dwell: coil charge time"
|
||||
|
|
|
@ -44,7 +44,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 Mon Mar 27 22:26:05 EDT 2017
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 03 21:25:16 EDT 2017
|
||||
|
||||
pageSize = 16376
|
||||
page = 1
|
||||
|
@ -1320,14 +1320,14 @@ fileVersion = { 20161225 }
|
|||
entry = baseFuel, "fuel: base", float, "%.2f"
|
||||
entry = fuelPidCorrection,"fuel: pid", float, "%.2f"
|
||||
entry = veValue, "fuel: VE", float, "%.3f"
|
||||
entry = injectorDutyCycle,"fuel: duty cyc",float,"%.3f"
|
||||
entry = coilDutyCycle, "dwell: duty", float,"%.3f"
|
||||
entry = injectorDutyCycle,"fuel: injector duty cycle",float,"%.3f"
|
||||
entry = coilDutyCycle, "dwell: coil duty cycle", float,"%.3f"
|
||||
|
||||
entry = engineLoadAccelExtra, "fuel: load extra",float, "%.3f"
|
||||
entry = engineLoadAccelExtra, "fuel: engine load acceleration extra fuel",float, "%.3f"
|
||||
entry = engineLoadDelta, "fuel: load change",float, "%.3f"
|
||||
|
||||
entry = deltaTps, "fuel: TPS change",float, "%.3f"
|
||||
entry = tpsAccelFuel, "fuel: TOS enrich", float, "%.3f"
|
||||
entry = tpsAccelFuel, "fuel: TPS acceleration extra fuel", float, "%.3f"
|
||||
|
||||
entry = wallFuelCorrection,"fuel: wall corr ms", float, "%.3f"
|
||||
entry = wallFuelAmount, "fuel: wall amount", float, "%.3f"
|
||||
|
@ -1336,7 +1336,7 @@ fileVersion = { 20161225 }
|
|||
entry = iatCorrection, "fuel: IAT corr", float, "%.3f"
|
||||
entry = cltCorrection, "cltCorrection", float,"%.3f"
|
||||
|
||||
entry = sparkDwellValue, "dwell", float,"%.3f"
|
||||
entry = sparkDwellValue, "dwell: coil charge time", float,"%.3f"
|
||||
entry = vvtPosition, "VVT", float,"%.2f"
|
||||
|
||||
; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d"
|
||||
|
|
|
@ -591,14 +591,14 @@ fileVersion = { 20161225 }
|
|||
entry = baseFuel, "fuel: base", float, "%.2f"
|
||||
entry = fuelPidCorrection,"fuel: pid", float, "%.2f"
|
||||
entry = veValue, "fuel: VE", float, "%.3f"
|
||||
entry = injectorDutyCycle,"fuel: duty cyc",float,"%.3f"
|
||||
entry = coilDutyCycle, "dwell: duty", float,"%.3f"
|
||||
entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f"
|
||||
entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f"
|
||||
|
||||
entry = engineLoadAccelExtra, "fuel: load extra",float, "%.3f"
|
||||
entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f"
|
||||
entry = engineLoadDelta, "fuel: load change",float, "%.3f"
|
||||
|
||||
entry = deltaTps, "fuel: TPS change",float, "%.3f"
|
||||
entry = tpsAccelFuel, "fuel: TOS enrich", float, "%.3f"
|
||||
entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f"
|
||||
|
||||
entry = wallFuelCorrection,"fuel: wall corr ms", float, "%.3f"
|
||||
entry = wallFuelAmount, "fuel: wall amount", float, "%.3f"
|
||||
|
@ -607,7 +607,7 @@ fileVersion = { 20161225 }
|
|||
entry = iatCorrection, "fuel: IAT corr", float, "%.3f"
|
||||
entry = cltCorrection, "cltCorrection", float,"%.3f"
|
||||
|
||||
entry = sparkDwellValue, "dwell", float,"%.3f"
|
||||
entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f"
|
||||
entry = vvtPosition, "VVT", float,"%.2f"
|
||||
|
||||
; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
rem Let's regemerate 'svnversion.h'
|
||||
rem TODO: handle std err - for example, in case svn needs upgrade
|
||||
java -jar ../java_tools/version2header.jar 10000
|
||||
java -jar ../java_tools/version2header.jar 10000 https://github.com/rusefi/rusefi
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 27 22:26:05 EDT 2017
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 03 21:25:16 EDT 2017
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int FSIO_ADC_COUNT = 4;
|
||||
|
@ -1026,6 +1026,11 @@ public class Fields {
|
|||
public static final int fsioTable4LoadBins_offset = 16312;
|
||||
public static final int fsioTable4RpmBins_offset = 16344;
|
||||
public static final int TOTAL_CONFIG_SIZE = 16376;
|
||||
public static final String GAUGE_NAME_FUEL_TPS_EXTRA = "fuel: TPS acceleration extra fuel";
|
||||
public static final String GAUGE_NAME_FUEL_EL_EXTRA = "fuel: engine load acceleration extra fuel";
|
||||
public static final String GAUGE_NAME_FUEL_INJ_DUTY = "fuel: injector duty cycle";
|
||||
public static final String GAUGE_NAME_DWELL_DUTY = "dwell: coil duty cycle";
|
||||
public static final String GAUGE_COIL_DWELL_TIME = "dwell: coil charge time";
|
||||
public static final Field ENGINETYPE = Field.create("ENGINETYPE", 0, FieldType.INT);
|
||||
public static final Field ENGINESNIFFERRPMTHRESHOLD = Field.create("ENGINESNIFFERRPMTHRESHOLD", 4, FieldType.INT);
|
||||
public static final Field INJECTOR_FLOW = Field.create("INJECTOR_FLOW", 8, FieldType.FLOAT);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.rusefi.core;
|
||||
|
||||
import com.rusefi.config.FieldType;
|
||||
import com.rusefi.config.Fields;
|
||||
import eu.hansolo.steelseries.tools.BackgroundColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -95,7 +96,7 @@ public enum Sensor {
|
|||
T_CHARGE(SensorCategory.FUEL, FieldType.FLOAT, 52, BackgroundColor.MUD, 30, 140),
|
||||
// todo: unify with TIMING
|
||||
ignitionAdvance(SensorCategory.OPERATIONS, FieldType.FLOAT, 56, BackgroundColor.MUD, 30, 140),
|
||||
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
||||
DWELL(Fields.GAUGE_COIL_DWELL_TIME, SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
||||
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
||||
debugFloatField1(SensorCategory.OPERATIONS, FieldType.FLOAT, 68, BackgroundColor.MUD, 0, 5),
|
||||
VSS(SensorCategory.OPERATIONS, FieldType.FLOAT, 76, BackgroundColor.BLUE),
|
||||
|
@ -104,8 +105,8 @@ public enum Sensor {
|
|||
|
||||
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
||||
engineLoadAccelDelta(SensorCategory.FUEL, FieldType.FLOAT, 124, BackgroundColor.MUD),
|
||||
tpsAccelFuel(SensorCategory.FUEL, FieldType.FLOAT, 128, BackgroundColor.MUD),
|
||||
injectorDutyCycle(SensorCategory.OPERATIONS, FieldType.FLOAT, 140, BackgroundColor.MUD),
|
||||
tpsAccelFuel(Fields.GAUGE_NAME_FUEL_TPS_EXTRA, SensorCategory.FUEL, FieldType.FLOAT, 128, BackgroundColor.MUD),
|
||||
injectorDutyCycle(Fields.GAUGE_NAME_FUEL_INJ_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 140, BackgroundColor.MUD),
|
||||
wallFuelAmount(SensorCategory.FUEL, FieldType.FLOAT, 160, BackgroundColor.MUD),
|
||||
iatCorrection(SensorCategory.FUEL, FieldType.FLOAT, 164, BackgroundColor.MUD, 0, 5),
|
||||
wallFuelCorrection(SensorCategory.FUEL, FieldType.FLOAT, 168, BackgroundColor.MUD),
|
||||
|
@ -136,7 +137,7 @@ public enum Sensor {
|
|||
|
||||
debugFloatField6(SensorCategory.OPERATIONS, FieldType.FLOAT, 256, BackgroundColor.MUD, 0, 5),
|
||||
debugFloatField7(SensorCategory.OPERATIONS, FieldType.FLOAT, 260, BackgroundColor.MUD, 0, 5),
|
||||
coilDutyCycle(SensorCategory.OPERATIONS, FieldType.FLOAT, 272, BackgroundColor.MUD),
|
||||
coilDutyCycle(Fields.GAUGE_NAME_DWELL_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 272, BackgroundColor.MUD),
|
||||
|
||||
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
||||
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
||||
|
@ -151,8 +152,8 @@ public enum Sensor {
|
|||
private final FieldType type;
|
||||
private final int offset;
|
||||
|
||||
Sensor(SensorCategory category, FieldType type, int offset, BackgroundColor color, double minValue, double maxValue, String units) {
|
||||
name = name();
|
||||
Sensor(String name, SensorCategory category, FieldType type, int offset, BackgroundColor color, double minValue, double maxValue, String units) {
|
||||
this.name = name == null ? name() : name;
|
||||
this.type = type;
|
||||
this.offset = offset;
|
||||
this.category = category;
|
||||
|
@ -162,12 +163,24 @@ public enum Sensor {
|
|||
this.maxValue = maxValue;
|
||||
}
|
||||
|
||||
Sensor(SensorCategory category, FieldType type, int offset, BackgroundColor color, double minValue, double maxValue, String units) {
|
||||
this(null, category, type, offset, color, minValue, maxValue, units);
|
||||
}
|
||||
|
||||
Sensor(String name, SensorCategory category, FieldType type, int offset, BackgroundColor color, double minValue, double maxValue) {
|
||||
this(name, category, type, offset, color, minValue, maxValue, "n/a");
|
||||
}
|
||||
|
||||
Sensor(SensorCategory category, FieldType type, int offset, BackgroundColor color, double minValue, double maxValue) {
|
||||
this(category, type, offset, color, minValue, maxValue, "n/a");
|
||||
this(null, category, type, offset, color, minValue, maxValue);
|
||||
}
|
||||
|
||||
Sensor(SensorCategory category, FieldType type, int offset, BackgroundColor color) {
|
||||
this(category, type, offset, color, 0, 100);
|
||||
this(null, category, type, offset, color);
|
||||
}
|
||||
|
||||
Sensor(String name, SensorCategory category, FieldType type, int offset, BackgroundColor color) {
|
||||
this(name, category, type, offset, color, 0, 100);
|
||||
}
|
||||
|
||||
Sensor(String name, SensorCategory category) {
|
||||
|
|
Binary file not shown.
|
@ -29,6 +29,7 @@ public class ConfigField {
|
|||
|
||||
public static final int LENGTH = 24;
|
||||
private static final char TS_COMMENT_TAG = '+';
|
||||
public static final String ENUM_SUFFIX = "_enum";
|
||||
|
||||
/**
|
||||
* field name without structure name
|
||||
|
@ -224,7 +225,7 @@ public class ConfigField {
|
|||
writeJavaFieldName(javaFieldsWriter, nameWithPrefix, tsPosition);
|
||||
javaFieldsWriter.write("FieldType.FLOAT);" + EOL);
|
||||
} else {
|
||||
String enumOptions = VariableRegistry.INSTANCE.get(type + "_enum");
|
||||
String enumOptions = VariableRegistry.INSTANCE.get(type + ENUM_SUFFIX);
|
||||
|
||||
if (enumOptions != null && !javaEnums.contains(type)) {
|
||||
javaEnums.add(type);
|
||||
|
|
|
@ -24,6 +24,7 @@ public class VariableRegistry extends TreeMap<String, String> {
|
|||
|
||||
private final StringBuilder cAllDefinitions = new StringBuilder("//\n// generated by ConfigDefinition.jar tool based on rusefi_config.txt\n//\n\n");
|
||||
private final StringBuilder javaNumbericDefinitions = new StringBuilder();
|
||||
private final StringBuilder javaStringDefinitions = new StringBuilder();
|
||||
|
||||
private VariableRegistry() {
|
||||
super(String.CASE_INSENSITIVE_ORDER);
|
||||
|
@ -64,9 +65,23 @@ public class VariableRegistry extends TreeMap<String, String> {
|
|||
javaNumbericDefinitions.append("\tpublic static final int " + var + " = " + intValue + ";" + EOL);
|
||||
} catch (NumberFormatException e) {
|
||||
System.out.println("Not an integer: " + value);
|
||||
|
||||
if (isQuoted(value) && !var.trim().endsWith(ConfigField.ENUM_SUFFIX)) {
|
||||
// quoted and not with enum suffix means plain string define statement
|
||||
javaStringDefinitions.append("\tpublic static final String " + var + " = " + value + ";" + EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isQuoted(String value) {
|
||||
if (value == null)
|
||||
return false;
|
||||
value = value.trim();
|
||||
if (value.isEmpty())
|
||||
return false;
|
||||
return value.charAt(0) == '"' && value.charAt(value.length() - 1) == '"';
|
||||
}
|
||||
|
||||
public void register(String var, int i) {
|
||||
register(var, Integer.toString(i));
|
||||
register(var + "_hex", Integer.toString(i, 16));
|
||||
|
@ -82,6 +97,6 @@ public class VariableRegistry extends TreeMap<String, String> {
|
|||
}
|
||||
|
||||
public String getJavaConstants() {
|
||||
return javaNumbericDefinitions.toString();
|
||||
return javaNumbericDefinitions.toString() + javaStringDefinitions.toString();
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -9,22 +9,30 @@ import java.util.Date;
|
|||
public class Version2Header {
|
||||
private static final String NL = "\n";//System.getProperty("line.separator");
|
||||
|
||||
private static final String COMMAND = "svn info";
|
||||
private static final String COMMAND = "svn info ";
|
||||
private static final String VERSION_MARKER = "Last Changed Rev: ";
|
||||
private static final String HEADER_TAG = "VCS_VERSION";
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
if (args.length!=1) {
|
||||
if (args.length != 1 && args.length != 2) {
|
||||
System.out.println("Version offset value is now a mandatory parameter!");
|
||||
System.exit(-1);
|
||||
}
|
||||
int versionOffsetValue = Integer.parseInt(args[0]);
|
||||
String url = args.length == 2 ? args[1] : "";
|
||||
System.out.println("Hi, it's " + new Date());
|
||||
if (url.isEmpty()) {
|
||||
System.out.println("Looking for local version");
|
||||
} else {
|
||||
System.out.println("Looking for remove version: " + url);
|
||||
}
|
||||
String command = COMMAND + url;
|
||||
|
||||
System.out.println("Working with " + NL.length() + " line ends, offset " + versionOffsetValue);
|
||||
Process simulatorProcess = null;
|
||||
try {
|
||||
System.out.println("Executing [" + COMMAND + "]");
|
||||
simulatorProcess = Runtime.getRuntime().exec(COMMAND);
|
||||
System.out.println("Executing [" + command + "]");
|
||||
simulatorProcess = Runtime.getRuntime().exec(command);
|
||||
|
||||
BufferedReader stdout =
|
||||
new BufferedReader(new InputStreamReader(simulatorProcess.getInputStream()));
|
||||
|
@ -32,7 +40,7 @@ public class Version2Header {
|
|||
int counter = 0;
|
||||
String line;
|
||||
while ((line = stdout.readLine()) != null) {
|
||||
System.out.println("from " + COMMAND + ": " + line);
|
||||
System.out.println("from " + command + ": " + line);
|
||||
counter++;
|
||||
|
||||
if (line.startsWith(VERSION_MARKER)) {
|
||||
|
|
Loading…
Reference in New Issue