dead ETB calibration UI
This commit is contained in:
parent
75d2e11b5a
commit
caed05d4c2
|
@ -6,7 +6,7 @@ import java.net.URL;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
public class rusEFIVersion {
|
public class rusEFIVersion {
|
||||||
public static final int CONSOLE_VERSION = 20220124;
|
public static final int CONSOLE_VERSION = 20220127;
|
||||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||||
|
|
||||||
public static long classBuildTimeMillis() {
|
public static long classBuildTimeMillis() {
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.rusefi;
|
||||||
import com.rusefi.core.Sensor;
|
import com.rusefi.core.Sensor;
|
||||||
import com.rusefi.ui.GaugesGridElement;
|
import com.rusefi.ui.GaugesGridElement;
|
||||||
import com.rusefi.ui.UIContext;
|
import com.rusefi.ui.UIContext;
|
||||||
import com.rusefi.ui.etb.CalibrationPanel;
|
|
||||||
import com.rusefi.ui.etb.EtbCommandsPanel;
|
import com.rusefi.ui.etb.EtbCommandsPanel;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
@ -25,7 +24,6 @@ public class ETBPane {
|
||||||
|
|
||||||
content.add(new EtbCommandsPanel(uiContext).getContent(), BorderLayout.WEST);
|
content.add(new EtbCommandsPanel(uiContext).getContent(), BorderLayout.WEST);
|
||||||
content.add(centerPanel, BorderLayout.CENTER);
|
content.add(centerPanel, BorderLayout.CENTER);
|
||||||
content.add(new CalibrationPanel(uiContext).getContent(), BorderLayout.EAST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public JPanel getContent() {
|
public JPanel getContent() {
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
package com.rusefi.ui.etb;
|
|
||||||
|
|
||||||
import com.rusefi.config.generated.Fields;
|
|
||||||
import com.rusefi.io.CommandQueue;
|
|
||||||
import com.rusefi.ui.UIContext;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.putgemin.VerticalFlowLayout;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Andrey Belomutskiy, (c) 2013-2020
|
|
||||||
*/
|
|
||||||
public class CalibrationPanel {
|
|
||||||
private final JPanel content = new JPanel(new VerticalFlowLayout());
|
|
||||||
private final UIContext uiContext;
|
|
||||||
|
|
||||||
public CalibrationPanel(UIContext uiContext) {
|
|
||||||
this.uiContext = uiContext;
|
|
||||||
content.setBorder(BorderFactory.createTitledBorder("Calibration"));
|
|
||||||
content.add(createCommandButton("Grab TPS#1 fully closed", "calibrate_tps_1_closed"));
|
|
||||||
content.add(createCommandButton("Grab TPS#1 Wide Open", "calibrate_tps_1_wot"));
|
|
||||||
|
|
||||||
content.add(createCommandButton("Grab Pedal Up", Fields.CMD_CALIBRATE_PEDAL_UP));
|
|
||||||
content.add(createCommandButton("Grab Pedal Down", Fields.CMD_CALIBRATE_PEDAL_DOWN));
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private JButton createCommandButton(String caption, String command) {
|
|
||||||
JButton button = new JButton(caption);
|
|
||||||
button.addActionListener(new AbstractAction() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
uiContext.getCommandQueue().write(command);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return button;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JPanel getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue