rusEFI console: Seconds of nothing between "connect" and console #4773

This commit is contained in:
rusefillc 2022-11-25 21:23:03 -05:00
parent df9c048645
commit 10846acc6d
3 changed files with 10 additions and 3 deletions

View File

@ -62,6 +62,7 @@ public class ConsoleUI {
}
public ConsoleUI(String port) {
log.info("init...");
tabbedPane = new TabbedPanel(uiContext);
this.port = port;
MainFrame mainFrame = new MainFrame(this, tabbedPane);
@ -167,6 +168,7 @@ public class ConsoleUI {
});
AutoupdateUtil.setAppIcon(mainFrame.getFrame().getFrame());
log.info("showFrame");
mainFrame.getFrame().showFrame(tabbedPane.tabbedPane);
}

View File

@ -1,6 +1,7 @@
package com.rusefi.ui;
import com.camick.RXTextUtilities;
import com.devexperts.logging.Logging;
import com.rusefi.CodeWalkthrough;
import com.rusefi.config.Field;
import com.rusefi.core.Sensor;
@ -21,6 +22,8 @@ import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.*;
import static com.devexperts.logging.Logging.getLogging;
/**
* Andrey Belomutskiy, (c) 2013-2020
@ -29,6 +32,8 @@ import java.awt.event.*;
* See LiveDataPaneSandbox
*/
public class LiveDataPane {
private static final Logging log = getLogging(LiveDataPane.class);
public static final String CPP_SUFFIX = ".cpp";
/**
@ -38,14 +43,13 @@ public class LiveDataPane {
private boolean isPaused;
public LiveDataPane(UIContext uiContext) {
long start = System.currentTimeMillis();
JPanel vertical = new JPanel(new MigLayout("wrap 1", "[grow,fill]"));
vertical.setBorder(BorderFactory.createLineBorder(Color.orange));
JScrollPane scroll = new JScrollPane(vertical, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JPanel legend = populateLegend();
DefaultMutableTreeNode root = new DefaultMutableTreeNode();
for (live_data_e view : live_data_e.values()) {
String fileName = StateDictionary.INSTANCE.getFileName(view) + CPP_SUFFIX;
@ -134,6 +138,7 @@ public class LiveDataPane {
bottomPanel.add(new IntGaugeLabel("error", Sensor.lastErrorCode));
content.add(bottomPanel, BorderLayout.SOUTH);
log.info("created in " + (System.currentTimeMillis() - start) + "ms");
}
@NotNull

View File

@ -95,7 +95,7 @@ class ZoomControl extends JPanel {
}
private void setValue(double value) {
System.out.println("Zoom setValue " + value);
//log.info("Zoom setValue " + value);
this.value = value;
resetZoom.setEnabled(Math.abs(1 - value) > 0.01);