auto-sync
This commit is contained in:
parent
553291dc6e
commit
201dbbbe58
|
@ -1702,13 +1702,13 @@ typedef enum {
|
||||||
CUSTOM_OBD_32 = 6032,
|
CUSTOM_OBD_32 = 6032,
|
||||||
CUSTOM_OBD_33 = 6033,
|
CUSTOM_OBD_33 = 6033,
|
||||||
CUSTOM_OBD_34 = 6034,
|
CUSTOM_OBD_34 = 6034,
|
||||||
CUSTOM_OBD_35 = 6035,
|
CUSTOM_OBD_TRG_DECODING = 6035,
|
||||||
CUSTOM_SYNC_ERROR = 6036,
|
CUSTOM_SYNC_ERROR = 6036,
|
||||||
CUSTOM_SYNC_ERROR_2 = 6037,
|
CUSTOM_SYNC_ERROR_2 = 6037,
|
||||||
CUSTOM_OBD_38 = 6038,
|
CUSTOM_OBD_38 = 6038,
|
||||||
CUSTOM_OBD_39 = 6039,
|
CUSTOM_OBD_39 = 6039,
|
||||||
|
|
||||||
CUSTOM_OBD_40 = 6040,
|
CUSTOM_OBD_LOW_CAN_PERIOD = 6040,
|
||||||
CUSTOM_OBD_41 = 6041,
|
CUSTOM_OBD_41 = 6041,
|
||||||
CUSTOM_OBD_42 = 6042,
|
CUSTOM_OBD_42 = 6042,
|
||||||
CUSTOM_OBD_MMC_ERROR = 6043,
|
CUSTOM_OBD_MMC_ERROR = 6043,
|
||||||
|
@ -1720,7 +1720,7 @@ typedef enum {
|
||||||
CUSTOM_OBD_49 = 6049,
|
CUSTOM_OBD_49 = 6049,
|
||||||
|
|
||||||
CUSTOM_TOO_LONG_FUEL_INJECTION = 6050,
|
CUSTOM_TOO_LONG_FUEL_INJECTION = 6050,
|
||||||
CUSTOM_OBD_51 = 6051,
|
CUSTOM_OBD_ZERO_CYLINDER_COUNT = 6051,
|
||||||
CUSTOM_OBD_52 = 6052,
|
CUSTOM_OBD_52 = 6052,
|
||||||
CUSTOM_OBD_53 = 6053,
|
CUSTOM_OBD_53 = 6053,
|
||||||
CUSTOM_OBD_54 = 6054,
|
CUSTOM_OBD_54 = 6054,
|
||||||
|
|
|
@ -283,7 +283,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
||||||
errorDetection.add(isDecodingError);
|
errorDetection.add(isDecodingError);
|
||||||
|
|
||||||
if (isTriggerDecoderError()) {
|
if (isTriggerDecoderError()) {
|
||||||
warning(CUSTOM_OBD_35, "trigger decoding issue. expected %d/%d/%d got %d/%d/%d",
|
warning(CUSTOM_OBD_TRG_DECODING, "trigger decoding issue. expected %d/%d/%d got %d/%d/%d",
|
||||||
TRIGGER_SHAPE(expectedEventCount[0]), TRIGGER_SHAPE(expectedEventCount[1]),
|
TRIGGER_SHAPE(expectedEventCount[0]), TRIGGER_SHAPE(expectedEventCount[1]),
|
||||||
TRIGGER_SHAPE(expectedEventCount[2]), currentCycle.eventCount[0], currentCycle.eventCount[1],
|
TRIGGER_SHAPE(expectedEventCount[2]), currentCycle.eventCount[0], currentCycle.eventCount[1],
|
||||||
currentCycle.eventCount[2]);
|
currentCycle.eventCount[2]);
|
||||||
|
|
|
@ -231,7 +231,7 @@ static msg_t canThread(void *arg) {
|
||||||
canRead(); // todo: since this is a blocking operation, do we need a separate thread for 'write'?
|
canRead(); // todo: since this is a blocking operation, do we need a separate thread for 'write'?
|
||||||
|
|
||||||
if (engineConfiguration->canSleepPeriod < 10) {
|
if (engineConfiguration->canSleepPeriod < 10) {
|
||||||
warning(CUSTOM_OBD_40, "%d too low CAN", engineConfiguration->canSleepPeriod);
|
warning(CUSTOM_OBD_LOW_CAN_PERIOD, "%d too low CAN", engineConfiguration->canSleepPeriod);
|
||||||
engineConfiguration->canSleepPeriod = 50;
|
engineConfiguration->canSleepPeriod = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ public enum FileLog {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private OutputStream fileLog; // null if not opened yet or already closed
|
private OutputStream fileLog; // null if not opened yet or already closed
|
||||||
|
public static boolean suspendLogging;
|
||||||
|
|
||||||
FileLog() {
|
FileLog() {
|
||||||
}
|
}
|
||||||
|
@ -73,6 +74,8 @@ public enum FileLog {
|
||||||
|
|
||||||
public synchronized void logLine(String fullLine) {
|
public synchronized void logLine(String fullLine) {
|
||||||
System.out.println(fullLine);
|
System.out.println(fullLine);
|
||||||
|
if (suspendLogging)
|
||||||
|
return;
|
||||||
if (fileLog == null)
|
if (fileLog == null)
|
||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class BenchTestPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component createMILTest() {
|
private Component createMILTest() {
|
||||||
BenchTestPanel panel = new BenchTestPanel("MIL", UiUtils.loadIcon("check_engine.jpg")) {
|
BenchTestPanel panel = new BenchTestPanel("MIL", "check_engine.jpg") {
|
||||||
@NotNull
|
@NotNull
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "milbench";
|
return "milbench";
|
||||||
|
@ -37,7 +37,7 @@ public class BenchTestPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component createIdleTest() {
|
private Component createIdleTest() {
|
||||||
BenchTestPanel panel = new BenchTestPanel("Idle Valve", UiUtils.loadIcon("idle_valve.png")) {
|
BenchTestPanel panel = new BenchTestPanel("Idle Valve", ("idle_valve.png")) {
|
||||||
@NotNull
|
@NotNull
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "idlebench";
|
return "idlebench";
|
||||||
|
@ -47,7 +47,7 @@ public class BenchTestPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component createFanTest() {
|
private Component createFanTest() {
|
||||||
BenchTestPanel panel = new BenchTestPanel("Radiator Fan", UiUtils.loadIcon("radiator_fan.jpg")) {
|
BenchTestPanel panel = new BenchTestPanel("Radiator Fan", "radiator_fan.jpg") {
|
||||||
@NotNull
|
@NotNull
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "fanbench";
|
return "fanbench";
|
||||||
|
@ -57,7 +57,7 @@ public class BenchTestPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component createFuelPumpTest() {
|
private Component createFuelPumpTest() {
|
||||||
BenchTestPanel panel = new BenchTestPanel("Fuel Pump", UiUtils.loadIcon("fuel_pump.jpg")) {
|
BenchTestPanel panel = new BenchTestPanel("Fuel Pump", "fuel_pump.jpg") {
|
||||||
@NotNull
|
@NotNull
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "fuelpumpbench";
|
return "fuelpumpbench";
|
||||||
|
@ -68,8 +68,7 @@ public class BenchTestPane {
|
||||||
|
|
||||||
private Component createSparkTest() {
|
private Component createSparkTest() {
|
||||||
final JComboBox<Integer> indexes = createIndexCombo();
|
final JComboBox<Integer> indexes = createIndexCombo();
|
||||||
ImageIcon icon = UiUtils.loadIcon("spark.jpg");
|
BenchTestPanel panel = new BenchTestPanel("Spark #", "spark.jpg", indexes) {
|
||||||
BenchTestPanel panel = new BenchTestPanel("Spark #", icon, indexes) {
|
|
||||||
@Override
|
@Override
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "sparkbench2 1000 " + indexes.getSelectedItem() + " 5 333 3";
|
return "sparkbench2 1000 " + indexes.getSelectedItem() + " 5 333 3";
|
||||||
|
@ -80,8 +79,7 @@ public class BenchTestPane {
|
||||||
|
|
||||||
private Component createInjectorTest() {
|
private Component createInjectorTest() {
|
||||||
final JComboBox<Integer> indexes = createIndexCombo();
|
final JComboBox<Integer> indexes = createIndexCombo();
|
||||||
ImageIcon icon = UiUtils.loadIcon("injector.png");
|
BenchTestPanel panel = new BenchTestPanel("Injector #", "injector.png", indexes) {
|
||||||
BenchTestPanel panel = new BenchTestPanel("Injector #", icon, indexes) {
|
|
||||||
@Override
|
@Override
|
||||||
protected String getCommand() {
|
protected String getCommand() {
|
||||||
return "fuelbench2 1000 " + indexes.getSelectedItem() + " 5 333 3";
|
return "fuelbench2 1000 " + indexes.getSelectedItem() + " 5 333 3";
|
||||||
|
@ -107,7 +105,8 @@ public class BenchTestPane {
|
||||||
final JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
|
final JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
|
||||||
final JButton test = new JButton("Test");
|
final JButton test = new JButton("Test");
|
||||||
|
|
||||||
public BenchTestPanel(String text, ImageIcon icon, JComponent... components) {
|
public BenchTestPanel(String text, String iconFileName, JComponent... components) {
|
||||||
|
ImageIcon icon = UiUtils.loadIcon(iconFileName);
|
||||||
JPanel rightVerticalPanel = new JPanel(new VerticalFlowLayout());
|
JPanel rightVerticalPanel = new JPanel(new VerticalFlowLayout());
|
||||||
rightVerticalPanel.add(new JLabel(text));
|
rightVerticalPanel.add(new JLabel(text));
|
||||||
for (JComponent component : components)
|
for (JComponent component : components)
|
||||||
|
|
|
@ -38,7 +38,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see EngineSnifferPanel
|
* @see EngineSnifferPanel
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20161220;
|
public static final int CONSOLE_VERSION = 20161225;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
private static final String TAB_INDEX = "main_tab";
|
private static final String TAB_INDEX = "main_tab";
|
||||||
protected static final String PORT_KEY = "port";
|
protected static final String PORT_KEY = "port";
|
||||||
|
@ -254,6 +254,7 @@ public class Launcher {
|
||||||
public static void main(final String[] args) throws Exception {
|
public static void main(final String[] args) throws Exception {
|
||||||
FileLog.MAIN.start();
|
FileLog.MAIN.start();
|
||||||
getConfig().load();
|
getConfig().load();
|
||||||
|
FileLog.suspendLogging = getConfig().getRoot().getBoolProperty(GaugesPanel.DISABLE_LOGS);
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
|
||||||
VersionChecker.start();
|
VersionChecker.start();
|
||||||
SwingUtilities.invokeAndWait(new Runnable() {
|
SwingUtilities.invokeAndWait(new Runnable() {
|
||||||
|
|
|
@ -18,6 +18,8 @@ import java.beans.PropertyChangeListener;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date: 2/5/13
|
* Date: 2/5/13
|
||||||
* (c) Andrey Belomutskiy
|
* (c) Andrey Belomutskiy
|
||||||
|
@ -54,6 +56,7 @@ public class GaugesPanel {
|
||||||
private static final String SHOW_MESSAGES = "show_messages";
|
private static final String SHOW_MESSAGES = "show_messages";
|
||||||
private static final String SHOW_RPM = "show_rpm";
|
private static final String SHOW_RPM = "show_rpm";
|
||||||
private static final String SPLIT_LOCATION = "SPLIT_LOCATION";
|
private static final String SPLIT_LOCATION = "SPLIT_LOCATION";
|
||||||
|
public static final String DISABLE_LOGS = "DISABLE_LOGS";
|
||||||
public static boolean IS_PAUSED; // dirty but works for not
|
public static boolean IS_PAUSED; // dirty but works for not
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -159,6 +162,16 @@ public class GaugesPanel {
|
||||||
@NotNull
|
@NotNull
|
||||||
private JPopupMenu createMenu(final Node config) {
|
private JPopupMenu createMenu(final Node config) {
|
||||||
JPopupMenu menu = new JPopupMenu();
|
JPopupMenu menu = new JPopupMenu();
|
||||||
|
final JCheckBoxMenuItem saveDetailedLogs = new JCheckBoxMenuItem("Save detailed logs");
|
||||||
|
saveDetailedLogs.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
FileLog.suspendLogging = !saveDetailedLogs.isSelected();
|
||||||
|
getConfig().getRoot().setBoolProperty(DISABLE_LOGS, FileLog.suspendLogging);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
saveDetailedLogs.setSelected(!FileLog.suspendLogging);
|
||||||
|
|
||||||
final JCheckBoxMenuItem showRpmItem = new JCheckBoxMenuItem("Show RPM");
|
final JCheckBoxMenuItem showRpmItem = new JCheckBoxMenuItem("Show RPM");
|
||||||
final JCheckBoxMenuItem showCommandsItem = new JCheckBoxMenuItem("Show Commands");
|
final JCheckBoxMenuItem showCommandsItem = new JCheckBoxMenuItem("Show Commands");
|
||||||
showRpmItem.setSelected(showRpmPanel);
|
showRpmItem.setSelected(showRpmPanel);
|
||||||
|
@ -181,7 +194,8 @@ public class GaugesPanel {
|
||||||
showCommandsItem.setSelected(showMessagesPanel);
|
showCommandsItem.setSelected(showMessagesPanel);
|
||||||
menu.add(showCommandsItem);
|
menu.add(showCommandsItem);
|
||||||
menu.add(new JPopupMenu.Separator());
|
menu.add(new JPopupMenu.Separator());
|
||||||
menu.add(new JPopupMenu("Reset Config"));
|
menu.add(saveDetailedLogs);
|
||||||
|
menu.add(new JPopupMenu("Reset Config")); // todo looks like not working
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue