diff --git a/.gitignore b/.gitignore
index f7d724ae67..8e22ec09e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ Debug/
.settings/
firmware/rusefi_ram_report.txt
doxygen/
-.idea
\ No newline at end of file
+.idea
+workspace.xml
diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h
index d5916e6a92..5c10e4d3ab 100644
--- a/firmware/controllers/algo/rusefi_enums.h
+++ b/firmware/controllers/algo/rusefi_enums.h
@@ -798,6 +798,9 @@ typedef enum {
*/
DBG_ELECTRONIC_THROTTLE_PID = 17,
DBG_EXECUTOR = 18,
+ /**
+ * See tunerstudio.cpp
+ */
DBG_BENCH_TEST = 19,
DBG_AUX_VALVES = 20,
DBG_ADC = 21,
diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h
index 119a4dfe6e..4e27b0d2e6 100644
--- a/firmware/controllers/algo/rusefi_generated.h
+++ b/firmware/controllers/algo/rusefi_generated.h
@@ -59,7 +59,7 @@
#define MAP_ACCEL_TAPER 8
#define BARO_CORR_SIZE 4
#define MAF_DECODING_COUNT 256
-#define debug_mode_e_enum "Alternator_PID", "TPS accel enrich", "Warmup PID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"
+#define debug_mode_e_enum "Alternator PID", "TPS accel enrich", "Warmup PID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"
#define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7"
#define mass_storage_e_enum "Auto", "Always", "Never"
#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID"
diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp
index 2b1c7cae9c..309e8e1dd6 100644
--- a/firmware/controllers/engine_controller.cpp
+++ b/firmware/controllers/engine_controller.cpp
@@ -778,5 +778,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
- return 20190308;
+ return 20190312;
}
diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp
index 0d93a8f9d3..2f2b6bc07e 100644
--- a/firmware/controllers/injector_central.cpp
+++ b/firmware/controllers/injector_central.cpp
@@ -268,7 +268,7 @@ void runBenchTest(uint16_t subsystem, uint16_t index) {
setCallFromPitStop(30000);
} else if (subsystem == 0x30) {
setEngineType(index);
- } else if (subsystem == 0x99) {
+ } else if (subsystem == 0x79) {
scheduleStopEngine();
}
}
diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt
index b6b9e50e5b..34989e42db 100644
--- a/firmware/integration/rusefi_config.txt
+++ b/firmware/integration/rusefi_config.txt
@@ -156,7 +156,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 Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"
+#define debug_mode_e_enum "Alternator PID", "TPS accel enrich", "Warmup PID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:4], @@debug_mode_e_enum@@
#define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7"
diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input
index 87d07432d3..2465b1f4dc 100644
--- a/firmware/tunerstudio/rusefi.input
+++ b/firmware/tunerstudio/rusefi.input
@@ -739,16 +739,18 @@ fileVersion = { 20171101 }
idleAirValvePositionGauge = idleAirValvePosition, "idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
- warningCounterGauge = warningCounter, "warn", "", 0, 100, 0, 0, 100, 100, 0, 0
- lastErrorCodeGauge = lastErrorCode, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode0Gauge = recentErrorCode0, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode1Gauge = recentErrorCode1, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode2Gauge = recentErrorCode2, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode3Gauge = recentErrorCode3, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode4Gauge = recentErrorCode4, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode5Gauge = recentErrorCode5, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode6Gauge = recentErrorCode6, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
- recentErrorCode7Gauge = recentErrorCode7, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+
+gaugeCategory = Status
+ warningCounterGauge = warningCounter, "Counter", "", 0, 100, 0, 0, 100, 100, 0, 0
+ lastErrorCodeGauge = lastErrorCode, "Latest Error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
+ recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
gaugeCategory = Debug
debugFloatField1Gauge = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@, "%", 0, 100, 0, 0, 100, 100, 4, 4
@@ -2253,7 +2255,7 @@ cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A"
field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16}
field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16}
field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16}
- field = "etbDeadband", Deadband, {throttlePedalPositionAdcChannel != 16}
+ field = "etbDeadband", etbDeadband, {throttlePedalPositionAdcChannel != 16}
dialog = testSpark, "Spark"
commandButton = "Spark #1", cmd_test_spk1
diff --git a/java_console/models/src/com/rusefi/TS2C.java b/java_console/models/src/com/rusefi/TS2C.java
index 68ee947a46..adc139bc31 100644
--- a/java_console/models/src/com/rusefi/TS2C.java
+++ b/java_console/models/src/com/rusefi/TS2C.java
@@ -27,6 +27,7 @@ public class TS2C {
}
private TS2C(String[] args) throws IOException {
+ System.out.println("This tool reads TS tune file and produces some C code for hardcoded base tunes");
if (args.length != 4 && args.length != 5) {
System.out.println("Four parameters expected: ");
System.out.println(" INPUT_MSQ_FILE NAME LOAD_SECTION_NAME RPM_SECTION_NAME TABLE_NAME");
@@ -35,21 +36,21 @@ public class TS2C {
System.out.println(" currenttune.msq veLoadBins veRpmBins veTable");
System.exit(-1);
}
- String fileName = args[0];
+ String msqFileName = args[0];
String loadSectionName = args[1];
String rpmSectionName = args[2];
String tableName = args[3];
size = Integer.parseInt(args.length > 4 ? args[4] : "16");
if (!loadSectionName.equalsIgnoreCase("none")) {
- BufferedReader r = readAndScroll(fileName, loadSectionName);
+ BufferedReader r = readAndScroll(msqFileName, loadSectionName);
loadCount = size;
loadBins = new float[loadCount];
readAxle(loadBins, r);
}
if (!rpmSectionName.equalsIgnoreCase("none")) {
- BufferedReader r = readAndScroll(fileName, rpmSectionName);
+ BufferedReader r = readAndScroll(msqFileName, rpmSectionName);
rpmCount = size;
rpmBins = new float[rpmCount];
readAxle(rpmBins, r);
@@ -60,7 +61,7 @@ public class TS2C {
table[i] = new float[size];
}
- BufferedReader r = readAndScroll(fileName, tableName);
+ BufferedReader r = readAndScroll(msqFileName, tableName);
readTable(table, r);
BufferedWriter w = new BufferedWriter(new FileWriter("output.c"));
@@ -77,6 +78,7 @@ public class TS2C {
w.write("\r\n\r\n/* load bins */\r\n\r\n");
w.write(toString(loadBins));
+ w.write("\r\n\r\n");
w.close();
diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java
index aa23edcb38..e168e534d0 100644
--- a/java_console/models/src/com/rusefi/config/Fields.java
+++ b/java_console/models/src/com/rusefi/config/Fields.java
@@ -1,6 +1,6 @@
package com.rusefi.config;
-// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Mar 10 11:53:40 EDT 2019
+// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Mar 12 13:29:56 EDT 2019
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int BLOCKING_FACTOR = 400;
@@ -1728,7 +1728,7 @@ public class Fields {
public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2100, FieldType.FLOAT);
public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2104, FieldType.FLOAT);
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2108, FieldType.FLOAT);
- public static final String[] debug_mode_e = {"Alternator_PID", "TPS accel enrich", "Warmup PID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"};
+ public static final String[] debug_mode_e = {"Alternator PID", "TPS accel enrich", "Warmup PID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "ADC", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "mode28", "mode29", "Ion Sense"};
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2112, FieldType.INT, debug_mode_e);
public static final Field WARMUPAFRTHRESHOLD = Field.create("WARMUPAFRTHRESHOLD", 2148, FieldType.FLOAT);
public static final Field BOOSTCUTPRESSURE = Field.create("BOOSTCUTPRESSURE", 2152, FieldType.FLOAT);
diff --git a/java_console/ts2c_fuelTable.bat b/java_console/ts2c_fuelTable.bat
new file mode 100644
index 0000000000..a4647ed5f3
--- /dev/null
+++ b/java_console/ts2c_fuelTable.bat
@@ -0,0 +1 @@
+java -cp ../java_console_binary/rusefi_console.jar com.rusefi.TS2C currenttune.msq fuelLoadBins fuelRpmBins fuelTable
\ No newline at end of file
diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java
index 845f654104..676f274a5c 100644
--- a/java_console/ui/src/com/rusefi/Launcher.java
+++ b/java_console/ui/src/com/rusefi/Launcher.java
@@ -50,6 +50,9 @@ public class Launcher {
private static final String TAB_INDEX = "main_tab";
protected static final String PORT_KEY = "port";
protected static final String SPEED_KEY = "speed";
+ private static final String TOOL_NAME_COMPILE_FSIO_FILE = "compile_fsio_file";
+ // todo: rename to something more FSIO-specific? would need to update documentation somewhere
+ private static final String TOOL_NAME_COMPILE = "compile";
private final String port;
// todo: the logic around 'fatalError' could be implemented nicer
private String fatalError;
@@ -288,7 +291,7 @@ public class Launcher {
public static void main(final String[] args) throws Exception {
String toolName = args.length == 0 ? null : args[0];
- if ("compile_fsio_file".equalsIgnoreCase(toolName)) {
+ if (TOOL_NAME_COMPILE_FSIO_FILE.equalsIgnoreCase(toolName)) {
/**
* re-packaging array which contains input and output file names
*/
@@ -297,7 +300,7 @@ public class Launcher {
return;
}
- if ("compile".equals(toolName)) {
+ if (TOOL_NAME_COMPILE.equals(toolName)) {
if (args.length != 2) {
System.err.println("input expression parameter expected");
System.exit(-1);
@@ -307,7 +310,8 @@ public class Launcher {
System.out.println(CompileTool.handleOneFsioLine(input));
System.exit(0);
}
-
+ System.out.println("Optional tools: " + Arrays.asList(TOOL_NAME_COMPILE_FSIO_FILE, TOOL_NAME_COMPILE));
+ System.out.println("Starting rusEfi UI console " + CONSOLE_VERSION);
FileLog.MAIN.start();
getConfig().load();
diff --git a/java_tools/ts2c/.idea/misc.xml b/java_tools/ts2c/.idea/misc.xml
index 1fb369d7c3..19b9b1bb1c 100644
--- a/java_tools/ts2c/.idea/misc.xml
+++ b/java_tools/ts2c/.idea/misc.xml
@@ -3,10 +3,7 @@
-
+
-
-
-
\ No newline at end of file
diff --git a/java_tools/ts2c/readme.md b/java_tools/ts2c/readme.md
new file mode 100644
index 0000000000..95881b31fd
--- /dev/null
+++ b/java_tools/ts2c/readme.md
@@ -0,0 +1,3 @@
+Looks like this folder is dead, TS2C was moved to rusefi console project?
+
+TODO: decide what to do with this folder
\ No newline at end of file