Console should get much smarter around compatibility with older units #6845
only:java progress
This commit is contained in:
parent
d98b4a136b
commit
76b0c0a522
|
@ -2392,10 +2392,6 @@ end_struct
|
|||
#define TS_TRIGGER_SCOPE_CHANNEL_1_NAME "Channel 1"
|
||||
#define TS_TRIGGER_SCOPE_CHANNEL_2_NAME "Channel 2"
|
||||
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX "generated/simulator_tune_image"
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX ".bin"
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME "generated/simulator_tune_image.bin"
|
||||
|
||||
! some board files override this value using prepend file
|
||||
#define ts_show_ign_key_switch false
|
||||
#define ts_show_ford_toyota_tps_pps true
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
|
||||
#define REBOOT_COMMAND 0xbb
|
||||
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX "generated/simulator_tune_image"
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX ".bin"
|
||||
#define SIMULATOR_TUNE_BIN_FILE_NAME "generated/simulator_tune_image.bin"
|
||||
|
||||
#define TS_COMPOSITE_ENABLE 1
|
||||
#define TS_COMPOSITE_DISABLE 2
|
||||
#define TS_COMPOSITE_READ 3
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CompositeParser {
|
|||
|
||||
List<CompositeEvent> events = new ArrayList<>();
|
||||
|
||||
while (ptr + Fields.COMPOSITE_PACKET_SIZE <= response.length) {
|
||||
while (ptr + Integration.COMPOSITE_PACKET_SIZE <= response.length) {
|
||||
|
||||
// Convert the int to a long since java can't do unsigned ints,
|
||||
// so we have to use a long (but still only want 32 bits read)
|
||||
|
|
|
@ -1254,6 +1254,7 @@ public class Fields {
|
|||
public static final int SentInput_INPUT6 = 6;
|
||||
public static final int SentInput_INPUT7 = 7;
|
||||
public static final int SentInput_NONE = 0;
|
||||
public static final int SIGNATURE_HASH = 881579691;
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME = "generated/simulator_tune_image.bin";
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX = "generated/simulator_tune_image";
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX = ".bin";
|
||||
|
|
|
@ -83,6 +83,9 @@ public class Integration {
|
|||
public static final String PROTOCOL_TEST_RESPONSE_TAG = "ts_p_alive";
|
||||
public static final String PROTOCOL_VERSION_TAG = "rusEfiVersion";
|
||||
public static final int REBOOT_COMMAND = 0xbb;
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME = "generated/simulator_tune_image.bin";
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX = "generated/simulator_tune_image";
|
||||
public static final String SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX = ".bin";
|
||||
public static final String TOP_DEAD_CENTER_MESSAGE = "r";
|
||||
public static final char TS_BURN_COMMAND = 'B';
|
||||
public static final char TS_CHUNK_WRITE_COMMAND = 'C';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.rusefi.waves;
|
||||
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -39,7 +40,7 @@ public class EngineChart {
|
|||
}
|
||||
|
||||
public RevolutionLog getRevolutionsLog() {
|
||||
StringBuilder revolutions = get(Fields.TOP_DEAD_CENTER_MESSAGE);
|
||||
StringBuilder revolutions = get(Integration.TOP_DEAD_CENTER_MESSAGE);
|
||||
return RevolutionLog.parseRevolutions(revolutions);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.ui;
|
|||
|
||||
import com.rusefi.FileLog;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.MessagesCentral;
|
||||
import com.rusefi.core.preferences.storage.Node;
|
||||
import com.rusefi.ui.util.UiUtils;
|
||||
|
@ -51,7 +52,7 @@ public class WarningPanel {
|
|||
if (haveFatalError)
|
||||
return;
|
||||
|
||||
if (message.startsWith(Fields.CRITICAL_PREFIX)) {
|
||||
if (message.startsWith(Integration.CRITICAL_PREFIX)) {
|
||||
haveFatalError = true;
|
||||
criticalErrorBlinking.start();
|
||||
label.setText(message);
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.ui.console;
|
|||
|
||||
import com.rusefi.PaneSettings;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.MessagesCentral;
|
||||
import com.rusefi.io.ConnectionStatusLogic;
|
||||
import com.rusefi.ui.LogDownloader;
|
||||
|
@ -53,7 +54,7 @@ public class TabbedPanel {
|
|||
|
||||
public TabbedPanel(UIContext uiContext) {
|
||||
MessagesCentral.getInstance().addListener((clazz, message) -> {
|
||||
if (message.startsWith(Fields.CRITICAL_PREFIX))
|
||||
if (message.startsWith(Integration.CRITICAL_PREFIX))
|
||||
criticalError = message;
|
||||
});
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.opensr5.ini.*;
|
|||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.binaryprotocol.MsqFactory;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
import com.rusefi.tune.xml.Constant;
|
||||
import com.rusefi.tune.xml.Msq;
|
||||
|
@ -37,7 +38,7 @@ public class WriteSimulatorConfiguration {
|
|||
log.info("ROOT_FOLDER=" + ROOT_FOLDER);
|
||||
try {
|
||||
try {
|
||||
readBinaryWriteXmlTune(iniFileName, Fields.SIMULATOR_TUNE_BIN_FILE_NAME, ENGINE_TUNE_OUTPUT_FOLDER + TuneCanTool.DEFAULT_TUNE, ini);
|
||||
readBinaryWriteXmlTune(iniFileName, Integration.SIMULATOR_TUNE_BIN_FILE_NAME, ENGINE_TUNE_OUTPUT_FOLDER + TuneCanTool.DEFAULT_TUNE, ini);
|
||||
} catch (Throwable e) {
|
||||
throw new IllegalStateException("White default tune", e);
|
||||
}
|
||||
|
@ -56,7 +57,7 @@ public class WriteSimulatorConfiguration {
|
|||
|
||||
private static void writeSpecificEngineType(String iniFileName, engine_type_e engineType, IniFileModelImpl ini) {
|
||||
try {
|
||||
String in = Fields.SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX + "_" + engineType.ordinal() + Fields.SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX;
|
||||
String in = Integration.SIMULATOR_TUNE_BIN_FILE_NAME_PREFIX + "_" + engineType.ordinal() + Integration.SIMULATOR_TUNE_BIN_FILE_NAME_SUFFIX;
|
||||
readBinaryWriteXmlTune(iniFileName, in,
|
||||
TuneCanTool.getDefaultTuneOutputFileName(engineType), ini);
|
||||
} catch (Throwable e) {
|
||||
|
|
Loading…
Reference in New Issue