refactoring: extracting magic command constant
This commit is contained in:
parent
ba02a1a4fc
commit
b51e79357e
|
@ -364,6 +364,8 @@
|
|||
#define clutchUpPinInverted_offset_hex 3d0
|
||||
#define clutchUpPinMode_offset 971
|
||||
#define clutchUpPinMode_offset_hex 3cb
|
||||
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
|
||||
#define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up"
|
||||
#define CMD_DISABLE "disable"
|
||||
#define CMD_ENABLE "enable"
|
||||
#define CMD_REBOOT "reboot"
|
||||
|
|
|
@ -1370,8 +1370,8 @@ void initSettings(void) {
|
|||
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(CMD_CALIBRATE_PEDAL_UP, grabPedalIsUp);
|
||||
addConsoleAction(CMD_CALIBRATE_PEDAL_DOWN, grabPedalIsWideOpen);
|
||||
addConsoleAction("info", printAllInfo);
|
||||
|
||||
addConsoleAction("set_one_coil_ignition", setOneCoilIgnition);
|
||||
|
|
|
@ -1237,6 +1237,9 @@ end_struct
|
|||
#define GAUGE_NAME_DEBUG_I5 "debug i5"
|
||||
|
||||
|
||||
#define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up"
|
||||
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
|
||||
|
||||
#define CMD_TRIGGERINFO "triggerinfo"
|
||||
#define CMD_WRITECONFIG "writeconfig"
|
||||
#define CMD_REBOOT "reboot"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Sep 02 00:13:32 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Sep 02 22:52:53 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.JavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -234,6 +234,8 @@ public class Fields {
|
|||
public static final int clutchUpPin_offset = 969;
|
||||
public static final int clutchUpPinInverted_offset = 976;
|
||||
public static final int clutchUpPinMode_offset = 971;
|
||||
public static final String CMD_CALIBRATE_PEDAL_DOWN = "calibrate_pedal_down";
|
||||
public static final String CMD_CALIBRATE_PEDAL_UP = "calibrate_pedal_up";
|
||||
public static final String CMD_DISABLE = "disable";
|
||||
public static final String CMD_ENABLE = "enable";
|
||||
public static final String CMD_REBOOT = "reboot";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.rusefi.ui.etb;
|
||||
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.putgemin.VerticalFlowLayout;
|
||||
|
@ -18,8 +19,8 @@ public class CalibrationPanel {
|
|||
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", "calibrate_pedal_up"));
|
||||
content.add(createCommandButton("Grab Pedal Down", "calibrate_pedal_down"));
|
||||
content.add(createCommandButton("Grab Pedal Up", Fields.CMD_CALIBRATE_PEDAL_UP));
|
||||
content.add(createCommandButton("Grab Pedal Down", Fields.CMD_CALIBRATE_PEDAL_DOWN));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
|
Loading…
Reference in New Issue