diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 53b45f5e75..79e9d73da5 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -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 */ diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 7bd2e1de53..08b8d3f28d 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -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); diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index 6527305d21..0591917bc6 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -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"; diff --git a/java_console/ui/src/com/rusefi/ui/etb/CalibrationPanel.java b/java_console/ui/src/com/rusefi/ui/etb/CalibrationPanel.java index 388bbc55b2..c47cd17b60 100644 --- a/java_console/ui/src/com/rusefi/ui/etb/CalibrationPanel.java +++ b/java_console/ui/src/com/rusefi/ui/etb/CalibrationPanel.java @@ -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; }