auto-sync
This commit is contained in:
parent
a254a66d56
commit
60261ff6ed
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20151202;
|
||||
public static final int CONSOLE_VERSION = 20151214;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
@ -43,7 +43,7 @@ public class Launcher {
|
|||
private static Frame staticFrame;
|
||||
private final TableEditorPane tableEditor = new TableEditorPane();
|
||||
private final SettingsTab settingsTab = new SettingsTab();
|
||||
private final LogsManager logsManager = new LogsManager();
|
||||
private final LogDownloader logsManager = new LogDownloader();
|
||||
|
||||
FrameHelper frame = new FrameHelper() {
|
||||
@Override
|
||||
|
@ -81,10 +81,16 @@ public class Launcher {
|
|||
|
||||
ConnectionWatchdog.start();
|
||||
|
||||
tabbedPane.addTab("Gauges", new GaugesPanel(getConfig().getRoot().getChild("gauges")).getContent());
|
||||
tabbedPane.addTab("Formulas", new FormulasPane().getContent());
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.addTab("Gauges", new GaugesPanel(getConfig().getRoot().getChild("gauges")).getContent());
|
||||
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.addTab("Formulas", new FormulasPane().getContent());
|
||||
|
||||
tabbedPane.addTab("Engine Sniffer", engineSnifferPanel.getPanel());
|
||||
tabbedPane.addTab("Sensor Sniffer", new SensorSnifferPane(getConfig().getRoot().getChild("sensor_sniffer")).getPanel());
|
||||
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.addTab("Sensor Sniffer", new SensorSnifferPane(getConfig().getRoot().getChild("sensor_sniffer")).getPanel());
|
||||
|
||||
|
||||
// tabbedPane.addTab("LE controls", new FlexibleControls().getPanel());
|
||||
|
@ -96,13 +102,18 @@ public class Launcher {
|
|||
tabbedPane.add("ECU stimulation", stimulator.getPanel());
|
||||
}
|
||||
// tabbedPane.addTab("live map adjustment", new Live3DReport().getControl());
|
||||
tabbedPane.add("Messages", new MessagesPane(getConfig().getRoot().getChild("messages")).getContent());
|
||||
tabbedPane.addTab("Table Editor", tableEditor);
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.add("Messages", new MessagesPane(getConfig().getRoot().getChild("messages")).getContent());
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.addTab("Table Editor", tableEditor);
|
||||
// tabbedPane.add("Wizards", new Wizard().createPane());
|
||||
|
||||
tabbedPane.add("Settings", settingsTab.createPane());
|
||||
tabbedPane.add("Bench Test", new BenchTestPane().getContent());
|
||||
tabbedPane.add("Logs Manager", logsManager.getContent());
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.add("Settings", settingsTab.createPane());
|
||||
if (!LinkManager.isLogViewer())
|
||||
tabbedPane.add("Bench Test", new BenchTestPane().getContent());
|
||||
if (!LinkManager.isLogViewer() && false) // todo: fix it & better name?
|
||||
tabbedPane.add("Logs Manager", logsManager.getContent());
|
||||
|
||||
if (!LinkManager.isLogViewerMode(port)) {
|
||||
int selectedIndex = getConfig().getRoot().getIntProperty(TAB_INDEX, 2);
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.rusefi.ui;
|
|||
import com.rusefi.core.MessagesCentral;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
import com.rusefi.io.InvocationConfirmationListener;
|
||||
import com.rusefi.ui.logview.LogViewer;
|
||||
import com.rusefi.ui.util.UiUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.putgemin.VerticalFlowLayout;
|
||||
|
@ -13,10 +14,13 @@ import java.awt.event.ActionEvent;
|
|||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
* This tab is about uploading log files from ECU.
|
||||
*
|
||||
* (c) Andrey Belomutskiy
|
||||
* 6/20/2015.
|
||||
* @see LogViewer
|
||||
*/
|
||||
public class LogsManager {
|
||||
public class LogDownloader {
|
||||
/**
|
||||
* see LS_RESPONSE in firmware source code
|
||||
*/
|
||||
|
@ -26,7 +30,7 @@ public class LogsManager {
|
|||
|
||||
private final JPanel logFiles = new JPanel(new VerticalFlowLayout());
|
||||
|
||||
public LogsManager() {
|
||||
public LogDownloader() {
|
||||
UiUtils.showLoadingMessage(content);
|
||||
MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() {
|
||||
@Override
|
|
@ -144,7 +144,7 @@ public class RecentCommands {
|
|||
content.removeAll();
|
||||
|
||||
if (LinkManager.isLogViewer())
|
||||
content.add( createButton() );
|
||||
content.add(createButton());
|
||||
|
||||
JButton reset = new JButton(UiUtils.loadIcon("undo.jpg"));
|
||||
reset.setContentAreaFilled(false);
|
||||
|
|
|
@ -127,8 +127,10 @@ public class EngineSnifferPanel {
|
|||
upperPanel.add(pauseButton);
|
||||
upperPanel.add(new RpmLabel(2).getContent());
|
||||
|
||||
JComponent command = AnyCommand.createField(config, "chartsize " + EFI_DEFAULT_CHART_SIZE, true, true).getContent();
|
||||
upperPanel.add(command);
|
||||
if (!LinkManager.isLogViewer()) {
|
||||
JComponent command = AnyCommand.createField(config, "chartsize " + EFI_DEFAULT_CHART_SIZE, true, true).getContent();
|
||||
upperPanel.add(command);
|
||||
}
|
||||
|
||||
upperPanel.add(zoomControl);
|
||||
|
||||
|
@ -143,12 +145,15 @@ public class EngineSnifferPanel {
|
|||
|
||||
upperPanel.add(new URLLabel(HELP_TEXT, HELP_URL));
|
||||
|
||||
JPanel lowerButtons = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
|
||||
lowerButtons.add(new BitConfigField(Fields.ISENGINECHARTENABLED, "Collect Engine Data").getContent());
|
||||
lowerButtons.add(new ConfigField(Fields.ENGINECHARTSIZE, "Engine Sniffer size").getContent());
|
||||
|
||||
JPanel bottomPanel = new JPanel(new BorderLayout());
|
||||
bottomPanel.add(lowerButtons, BorderLayout.NORTH);
|
||||
|
||||
if (!LinkManager.isLogViewer()) {
|
||||
JPanel lowerButtons = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
|
||||
lowerButtons.add(new BitConfigField(Fields.ISENGINECHARTENABLED, "Collect Engine Data").getContent());
|
||||
lowerButtons.add(new ConfigField(Fields.ENGINECHARTSIZE, "Engine Sniffer size").getContent());
|
||||
bottomPanel.add(lowerButtons, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
bottomPanel.add(statusPanel.infoPanel, BorderLayout.SOUTH);
|
||||
|
||||
chartPanel.add(upperPanel, BorderLayout.NORTH);
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.rusefi.FileLog;
|
|||
import com.rusefi.core.EngineState;
|
||||
import com.rusefi.file.FileUtils;
|
||||
import com.rusefi.ui.ChartRepository;
|
||||
import com.rusefi.ui.LogDownloader;
|
||||
import com.rusefi.ui.engine.EngineSnifferPanel;
|
||||
import com.rusefi.ui.util.UiUtils;
|
||||
import com.rusefi.io.LinkManager;
|
||||
|
@ -25,6 +26,7 @@ import java.util.TreeMap;
|
|||
* <p/>
|
||||
* 7/27/13
|
||||
* (c) Andrey Belomutskiy
|
||||
* @see LogDownloader
|
||||
*/
|
||||
public class LogViewer extends JPanel {
|
||||
public static final FileFilter FILE_FILTER = new FileFilter() {
|
||||
|
@ -42,9 +44,6 @@ public class LogViewer extends JPanel {
|
|||
private String currentFolder;
|
||||
private static JPanel descPanel = new JPanel();
|
||||
|
||||
|
||||
// int currentChartIndex = 0;
|
||||
|
||||
public LogViewer(EngineSnifferPanel engineSnifferPanel) {
|
||||
super(new BorderLayout());
|
||||
this.engineSnifferPanel = engineSnifferPanel;
|
||||
|
|
Loading…
Reference in New Issue