auto-sync
This commit is contained in:
parent
6998b8357c
commit
f3b9d2985c
|
@ -42,7 +42,10 @@ public class EngineSnifferPanel {
|
|||
public static final String HELP_TEXT = "Click here for online help";
|
||||
|
||||
private final JPanel chartPanel = new JPanel(new BorderLayout());
|
||||
private final JPanel panel = new JPanel(new BorderLayout());
|
||||
/**
|
||||
* chartPanel in the center and warning panel on the bottom
|
||||
*/
|
||||
private final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
|
||||
/**
|
||||
* imageName -> UpDownImage
|
||||
|
@ -73,8 +76,6 @@ public class EngineSnifferPanel {
|
|||
private boolean isPaused;
|
||||
|
||||
public EngineSnifferPanel(Node config) {
|
||||
|
||||
|
||||
statusPanel.setTimeAxisTranslator(crank.createTranslator());
|
||||
|
||||
final JButton pauseButton = UiUtils.createPauseButton();
|
||||
|
@ -158,10 +159,6 @@ public class EngineSnifferPanel {
|
|||
|
||||
crank.setZoomProvider(zoomControl.getZoomProvider());
|
||||
resetImagePanel();
|
||||
// createSecondaryImage("c2");
|
||||
// createSecondaryImage("input1 A8");
|
||||
// createSecondaryImage("input2 E5");
|
||||
//
|
||||
|
||||
LinkManager.engineState.registerStringValueAction(EngineReport.ENGINE_CHART, new EngineState.ValueCallback<String>() {
|
||||
@Override
|
||||
|
@ -172,8 +169,8 @@ public class EngineSnifferPanel {
|
|||
}
|
||||
});
|
||||
|
||||
panel.add(chartPanel, BorderLayout.CENTER);
|
||||
panel.add(new WarningPanel().getPanel(), BorderLayout.SOUTH);
|
||||
mainPanel.add(chartPanel, BorderLayout.CENTER);
|
||||
mainPanel.add(new WarningPanel().getPanel(), BorderLayout.SOUTH);
|
||||
|
||||
// displayChart("wave_chart,crank2!down!192811978!crank2!up!192813389!crank2!down!192813749!crank2!up!192815156!crank2!down!192815512!crank!up!192820764!crank2!up!192825818!crank2!down!192826182!crank2!up!192827610!crank2!down!192827975!crank2!up!192829399!crank2!down!192829757!crank2!up!192831154!crank2!down!192831507!r!187!192834224!crank!down!192834224!crank2!up!192836757!crank2!down!192841994!crank2!up!192843561!crank2!down!192843925!crank2!up!192845334!crank2!down!192845693!crank2!up!192847086!crank2!down!192847439!crank!up!192853135!crank2!up!192857701!crank2!down!192858065!crank2!up!192859491!crank2!down!192859858!crank2!up!192861269!crank2!down!192861626!crank2!up!192863025!crank2!down!192863382!crank2!up!192868647!crank!down!192871268!crank2!down!192872804!crank2!up!192872804!crank!down!192872804!crank!up!192872804!crank2!down!192873898!crank2!up!192875508!crank2!down!192875887!crank2!up!192877357!crank2!down!192877732!crank2!up!192879192!crank2!down!192879565!crank!up!192886293!r!0!194982088!crank!down!194982088!crank2!up!194984699!crank2!down!194990112!crank2!up!194991715!crank2!down!194992085!crank2!up!194993530!crank2!down!194993884!crank2!up!194995292!crank2!down!194995645!crank!up!195001475!crank2!up!195006153!crank2!down!195006515!crank2!up!195007968!crank2!down!195008325!crank2!up!195009773!crank2!down!195010134!crank2!up!195011549!crank2!down!195011901!crank2!up!195017256!crank!down!195019915!crank2!down!195022597!crank2!up!195024189!crank2!down!195024554!crank2!up!195025980!crank2!down!195026329!crank2!up!195027744!crank2!down!195028103!crank!up!195033418!crank2!up!195038542!crank2!down!195038911!crank2!up!195040351!crank2!down!195040722!crank2!up!195042167!crank2!down!195042529!crank2!up!195043934!crank2!down!195044294!r!187!195047060!crank!down!195047060!crank2!up!195049619!crank2!down!195054954!crank2!up!195056549!crank2!down!195056920!crank2!up!195058345!crank2!down!195058703!crank2!up!195060114!crank2!down!195060464!crank!up!195066245!crank2!up!195070882!crank2!down!195071250!crank2!up!195072689!crank2!down!195073054!crank2!up!195074479!,");
|
||||
}
|
||||
|
@ -241,7 +238,7 @@ public class EngineSnifferPanel {
|
|||
}
|
||||
|
||||
public JPanel getPanel() {
|
||||
return panel;
|
||||
return mainPanel;
|
||||
}
|
||||
|
||||
private void createSecondaryImage(String name) {
|
||||
|
@ -278,7 +275,7 @@ public class EngineSnifferPanel {
|
|||
double maf = SensorCentral.getInstance().getValue(Sensor.MAF);
|
||||
String fileName = FileLog.getDate() + "rpm_" + rpm + "_maf_" + maf + ".png";
|
||||
|
||||
UiUtils.saveImageWithPrompt(fileName, panel, imagePanel);
|
||||
UiUtils.saveImageWithPrompt(fileName, mainPanel, imagePanel);
|
||||
}
|
||||
|
||||
private UpDownImage createImage(final String name) {
|
||||
|
|
|
@ -14,12 +14,11 @@ import java.awt.event.KeyEvent;
|
|||
* (c) Andrey Belomutskiy 2013-2017
|
||||
*/
|
||||
class ZoomControl extends JPanel {
|
||||
// private final JLabel currentValue = new JLabel();
|
||||
private double value;
|
||||
public ZoomControlListener listener = null;
|
||||
private final JButton resetZoom = new JButton("*");
|
||||
|
||||
ZoomProvider zoomProvider = new ZoomProvider() {
|
||||
private ZoomProvider zoomProvider = new ZoomProvider() {
|
||||
@Override
|
||||
public double getZoomValue() {
|
||||
return value;
|
||||
|
@ -34,16 +33,6 @@ class ZoomControl extends JPanel {
|
|||
super(new FlowLayout());
|
||||
setValue(1);
|
||||
|
||||
// final JTextField text = new JTextField() {
|
||||
// @Override
|
||||
// public Dimension getPreferredSize() {
|
||||
// Dimension size = super.getPreferredSize();
|
||||
// return new Dimension(200, size.height);
|
||||
// }
|
||||
// };
|
||||
|
||||
// add(currentValue);
|
||||
|
||||
JButton plus = new JButton("+");
|
||||
plus.setMnemonic('z');
|
||||
plus.addActionListener(new ActionListener() {
|
||||
|
@ -108,7 +97,7 @@ class ZoomControl extends JPanel {
|
|||
private void setValue(double value) {
|
||||
System.out.println("Zoom setValue " + value);
|
||||
this.value = value;
|
||||
//currentValue.setText(String.format(" %.4fms", value));
|
||||
|
||||
resetZoom.setEnabled(Math.abs(1 - value) > 0.01);
|
||||
if (listener != null)
|
||||
listener.onZoomChange();
|
||||
|
|
Loading…
Reference in New Issue