ETB tiny progress

This commit is contained in:
rusEfi 2019-04-30 19:22:12 -04:00
parent 5ea6ac01f9
commit a555aaba4e
4 changed files with 20 additions and 9 deletions

View File

@ -807,6 +807,6 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190425;
return 20190430;
}
#endif /* EFI_UNIT_TEST */

View File

@ -1349,6 +1349,10 @@ void initSettings(void) {
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
addConsoleAction("tempinfo", printTemperatureInfo);
addConsoleAction("tpsinfo", printTPSInfo);
addConsoleAction("calibrate_tps_1_closed", grabTPSIsClosed);
addConsoleAction("calibrate_tps_1_wot", grabTPSIsWideOpen);
addConsoleAction("calibrate_pedal_up", grabPedalIsUp);
addConsoleAction("calibrate_pedal_down", grabPedalIsWideOpen);
addConsoleAction("info", printAllInfo);
addConsoleAction("set_one_coil_ignition", setOneCoilIgnition);

View File

@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
* @see EngineSnifferPanel
*/
public class Launcher {
public static final int CONSOLE_VERSION = 20190424;
public static final int CONSOLE_VERSION = 20190430;
public static final boolean SHOW_STIMULATOR = false;
private static final String TAB_INDEX = "main_tab";
protected static final String PORT_KEY = "port";

View File

@ -1,9 +1,11 @@
package com.rusefi.ui.etb;
import com.rusefi.io.CommandQueue;
import org.jetbrains.annotations.NotNull;
import org.putgemin.VerticalFlowLayout;
import javax.swing.*;
import java.awt.event.ActionEvent;
/**
* (c) Andrey Belomutskiy
@ -13,17 +15,22 @@ public class CalibrationPanel {
public CalibrationPanel() {
content.setBorder(BorderFactory.createTitledBorder("Calibration"));
content.add(createCommandButton("Grab TPS#1 fully closed"));
content.add(createCommandButton("Grab TPS#1 Wide Open"));
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"));
content.add(createCommandButton("Grab Pedal Down"));
content.add(createCommandButton("Grab Pedal Up", "calibrate_pedal_up"));
content.add(createCommandButton("Grab Pedal Down", "calibrate_pedal_down"));
}
@NotNull
private JButton createCommandButton(String s) {
JButton button = new JButton(s);
button.setEnabled(false);
private JButton createCommandButton(String caption, String command) {
JButton button = new JButton(caption);
button.addActionListener(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
CommandQueue.getInstance().write(command);
}
});
return button;
}