overall usability progress

This commit is contained in:
rusefi 2019-03-12 14:35:49 -04:00
parent ccf21d187d
commit d9bed5809e
14 changed files with 57 additions and 42 deletions

3
.gitignore vendored
View File

@ -9,4 +9,5 @@ Debug/
.settings/
firmware/rusefi_ram_report.txt
doxygen/
.idea
.idea
workspace.xml

View File

@ -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,

View File

@ -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"

View File

@ -778,5 +778,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190308;
return 20190312;
}

View File

@ -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();
}
}

View File

@ -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"

View File

@ -63,7 +63,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 Mar 12 10:15:37 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Mar 12 14:24:16 EDT 2019
pageSize = 20000
page = 1
@ -632,7 +632,7 @@ page = 1
tpsDecelEnleanmentThreshold = scalar, F32, 2100, "roc", 1, 0, 0, 200, 3
tpsDecelEnleanmentMultiplier = scalar, F32, 2104, "coeff", 1, 0, 0, 200, 3
slowAdcAlpha = scalar, F32, 2108, "coeff", 1, 0, 0, 200, 3
debugMode = bits, U32, 2112, [0:4], "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"
debugMode = bits, U32, 2112, [0:4], "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"
warmupTargetAfrBins = array, F32, 2116, [4], "C", 1, 0, -100.0, 250.0, 2
warmupTargetAfr = array, F32, 2132, [4], "AFR", 1, 0, 0.0, 20.0, 2
warmupAfrThreshold = scalar, F32, 2148, "temperature", 1, 0, 0, 200, 3
@ -1627,16 +1627,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, "debug f1", "%", 0, 100, 0, 0, 100, 100, 4, 4
@ -3141,7 +3143,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

View File

@ -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

View File

@ -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();

View File

@ -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);

View File

@ -0,0 +1 @@
java -cp ../java_console_binary/rusefi_console.jar com.rusefi.TS2C currenttune.msq fuelLoadBins fuelRpmBins fuelTable

View File

@ -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();

View File

@ -3,10 +3,7 @@
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>

View File

@ -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