Skip to content

Commit

Permalink
rusEfi console: minor usability progress
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed May 2, 2019
1 parent 1ec5baf commit bfdd64b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions java_console/ui/src/com/rusefi/SimulatorHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import java.io.File;
import java.io.IOException;

import static com.rusefi.ui.util.UiUtils.setToolTip;

public class SimulatorHelper {
public static final String BINARY = "rusefi_simulator.exe";
private static Process process;
Expand Down Expand Up @@ -55,7 +57,6 @@ public void run() {
FileLog.MAIN.logLine("Port " + TcpConnector.DEFAULT_PORT + " is alive");

new Launcher("" + TcpConnector.DEFAULT_PORT);

}

public static JComponent createSimulatorComponent(final StartupFrame portSelector) {
Expand All @@ -65,14 +66,17 @@ public static JComponent createSimulatorComponent(final StartupFrame portSelecto
if (TcpConnector.isTcpPortOpened())
return new JLabel("Port " + TcpConnector.DEFAULT_PORT + " already busy. Simulator running?");

JButton simulatorButton = new JButton("Start Simulator");
JButton simulatorButton = new JButton("Start Virtual Simulator");
simulatorButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
portSelector.disposeFrameAndProceed();
startSimulator();
}
});
setToolTip(simulatorButton, "Connect to totally virtual simulator",
"You do not need any hardware to try rusEfi",
"This works via localhost: " + TcpConnector.DEFAULT_PORT + " TCP/IP port");

return simulatorButton;
}
Expand Down
4 changes: 3 additions & 1 deletion java_console/ui/src/com/rusefi/StartupFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.List;

import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
import static com.rusefi.ui.util.UiUtils.setToolTip;

/**
* This frame is used on startup to select the port we would be using
Expand All @@ -40,7 +41,7 @@ public class StartupFrame {
// todo: figure out a better way to work with absolute path
private static final String APPICON = "appicon.png";
private static final String LOGO = "logo.gif";
public static final String LINK_TEXT = "rusEfi (c) 2012-2018";
public static final String LINK_TEXT = "rusEfi (c) 2012-2019";
private static final String URI = "http://rusefi.com/?java_console";
private static final String VCP_DRIVER_TEXT = "vcp driver";
private static final String VCP_DRIVER_URI = "http://www.st.com/st-web-ui/static/active/en/st_prod_software_internet/resource/technical/software/driver/stsw-stm32102.zip";
Expand Down Expand Up @@ -112,6 +113,7 @@ public void chooseSerialPort() {
connectPanel.add(comboSpeeds);

final JButton connect = new JButton("Connect");
setToolTip(connect, "Connect to real hardware");
connectPanel.add(connect);
connect.addActionListener(new ActionListener() {
@Override
Expand Down

0 comments on commit bfdd64b

Please sign in to comment.