parent
5c846e4673
commit
2d41db282c
|
@ -2034,10 +2034,6 @@ uint16_t[ALTERNATOR_VOLTAGE_TARGET_SIZE] alternatorVoltageTargetRpmBins;;"RPM",
|
|||
|
||||
end_struct
|
||||
|
||||
#define CMD_SET_SENSOR_MOCK "set_sensor_mock"
|
||||
#define CMD_RESET_SENSOR_MOCKS "reset_sensor_mocks"
|
||||
#define CMD_RESET_SIMULATOR "reset_simulator"
|
||||
|
||||
#define GAUGE_NAME_VERSION "firmware"
|
||||
#define GAUGE_NAME_UPTIME "Uptime"
|
||||
! WARNING! THIS GAUGE NAME IS PART of REO integration API
|
||||
|
@ -2234,20 +2230,6 @@ end_struct
|
|||
#define ENGINE_MAKE_VAG "VAG"
|
||||
#define ENGINE_MAKE_Hyundai "Hyundai"
|
||||
|
||||
#define CMD_SET "set"
|
||||
#define CMD_GET "get"
|
||||
#define CMD_ENGINESNIFFERRPMTHRESHOLD "engineSnifferRpmThreshold"
|
||||
#define CMD_INDIVIDUAL_INJECTION "set_individual_coils_ignition"
|
||||
#define CMD_MIL_BENCH "milbench"
|
||||
#define CMD_FUEL_BENCH "fuelbench"
|
||||
#define CMD_FUEL_PUMP_BENCH "fuelpumpbench"
|
||||
#define CMD_IDLE_BENCH "idlebench"
|
||||
#define CMD_SPARK_BENCH "sparkbench"
|
||||
#define CMD_STARTER_BENCH "starterbench"
|
||||
#define CMD_HPFP_BENCH "hpfpbench"
|
||||
#define CMD_AC_RELAY_BENCH "acrelaybench"
|
||||
#define CMD_FAN_BENCH "fanbench"
|
||||
#define CMD_FAN2_BENCH "fan2bench"
|
||||
|
||||
! TEST_CONTROL_MAGIC_WORD copy-paste while we are learning how to share between rusEFI and stim firmware
|
||||
#define CAN_BENCH_HEADER2 0x66
|
||||
|
@ -2259,41 +2241,8 @@ end_struct
|
|||
#define BENCH_STARTER_DURATION 4000
|
||||
#define BENCH_AC_RELAY_DURATION 800
|
||||
|
||||
#define CMD_PINS "pins"
|
||||
#define CMD_ETB_DUTY "set_etb_duty"
|
||||
#define DEFAULT_SELT_STIM_RPM 1200
|
||||
#define DEFAULT_SELT_STIM_VVT0 23
|
||||
#define CMD_SELF_STIMULATION "self_stimulation"
|
||||
#define CMD_EXTERNAL_STIMULATION "ext_stimulation"
|
||||
#define CMD_RPM "rpm"
|
||||
#define CMD_VSS_PIN "vss_pin"
|
||||
#define CMD_TRIGGER_PIN "set_trigger_input_pin"
|
||||
#define CMD_LOGIC_PIN "set_logic_input_pin"
|
||||
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
|
||||
#define CMD_IDLE_PIN "set_idle_pin"
|
||||
#define CMD_BOOST_PIN "set_boost_pin"
|
||||
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
|
||||
#define CMD_IGNITION_PIN "set_ignition_pin"
|
||||
#define CMD_INJECTION_PIN "set_injection_pin"
|
||||
|
||||
#define CMD_RESET_ENGINE_SNIFFER "reset_engine_chart"
|
||||
#define CMD_FUNCTIONAL_TEST_MODE "test_mode"
|
||||
|
||||
#define CMD_ECU_UNLOCK "unlock"
|
||||
#define CMD_ENGINE_TYPE "engine_type"
|
||||
#define CMD_INJECTION "injection"
|
||||
#define CMD_IGNITION "ignition"
|
||||
#define CMD_PWM "pwm"
|
||||
#define CMD_TRIGGERINFO "triggerinfo"
|
||||
#define CMD_WRITECONFIG "writeconfig"
|
||||
#define CMD_BURNCONFIG "burnconfig"
|
||||
#define CMD_DATE "date"
|
||||
#define CMD_REBOOT "reboot"
|
||||
#define CMD_REBOOT_DFU "reboot_dfu"
|
||||
#define CMD_REBOOT_OPENBLT "reboot_openblt"
|
||||
#define CMD_ENABLE "enable"
|
||||
#define CMD_DISABLE "disable"
|
||||
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
|
||||
|
||||
#define PROTOCOL_MSG "msg"
|
||||
#define PROTOCOL_HELLO_PREFIX "***"
|
||||
|
|
|
@ -33,3 +33,56 @@
|
|||
|
||||
! High speed logger commands
|
||||
#define TS_SET_LOGGER_SWITCH 'l'
|
||||
|
||||
|
||||
|
||||
#define CMD_SET_SENSOR_MOCK "set_sensor_mock"
|
||||
#define CMD_RESET_SENSOR_MOCKS "reset_sensor_mocks"
|
||||
#define CMD_RESET_SIMULATOR "reset_simulator"
|
||||
#define CMD_SET "set"
|
||||
#define CMD_GET "get"
|
||||
#define CMD_ENGINESNIFFERRPMTHRESHOLD "engineSnifferRpmThreshold"
|
||||
#define CMD_INDIVIDUAL_INJECTION "set_individual_coils_ignition"
|
||||
#define CMD_MIL_BENCH "milbench"
|
||||
#define CMD_FUEL_BENCH "fuelbench"
|
||||
#define CMD_FUEL_PUMP_BENCH "fuelpumpbench"
|
||||
#define CMD_IDLE_BENCH "idlebench"
|
||||
#define CMD_SPARK_BENCH "sparkbench"
|
||||
#define CMD_STARTER_BENCH "starterbench"
|
||||
#define CMD_HPFP_BENCH "hpfpbench"
|
||||
#define CMD_AC_RELAY_BENCH "acrelaybench"
|
||||
#define CMD_FAN_BENCH "fanbench"
|
||||
#define CMD_FAN2_BENCH "fan2bench"
|
||||
#define CMD_PINS "pins"
|
||||
#define CMD_ETB_DUTY "set_etb_duty"
|
||||
#define CMD_SELF_STIMULATION "self_stimulation"
|
||||
#define CMD_EXTERNAL_STIMULATION "ext_stimulation"
|
||||
#define CMD_RPM "rpm"
|
||||
#define CMD_VSS_PIN "vss_pin"
|
||||
#define CMD_TRIGGER_PIN "set_trigger_input_pin"
|
||||
#define CMD_LOGIC_PIN "set_logic_input_pin"
|
||||
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
|
||||
#define CMD_IDLE_PIN "set_idle_pin"
|
||||
#define CMD_BOOST_PIN "set_boost_pin"
|
||||
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
|
||||
#define CMD_IGNITION_PIN "set_ignition_pin"
|
||||
#define CMD_INJECTION_PIN "set_injection_pin"
|
||||
|
||||
#define CMD_RESET_ENGINE_SNIFFER "reset_engine_chart"
|
||||
#define CMD_FUNCTIONAL_TEST_MODE "test_mode"
|
||||
|
||||
#define CMD_ECU_UNLOCK "unlock"
|
||||
#define CMD_ENGINE_TYPE "engine_type"
|
||||
#define CMD_INJECTION "injection"
|
||||
#define CMD_IGNITION "ignition"
|
||||
#define CMD_PWM "pwm"
|
||||
#define CMD_TRIGGERINFO "triggerinfo"
|
||||
#define CMD_WRITECONFIG "writeconfig"
|
||||
#define CMD_BURNCONFIG "burnconfig"
|
||||
#define CMD_DATE "date"
|
||||
#define CMD_REBOOT "reboot"
|
||||
#define CMD_REBOOT_DFU "reboot_dfu"
|
||||
#define CMD_REBOOT_OPENBLT "reboot_openblt"
|
||||
#define CMD_ENABLE "enable"
|
||||
#define CMD_DISABLE "disable"
|
||||
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi;
|
|||
|
||||
import com.rusefi.autotest.ControllerConnectorState;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
|
@ -27,12 +28,12 @@ public class EnduranceTestUtility {
|
|||
|
||||
for (int i = 0; i < count; i++) {
|
||||
EcuTestHelper.currentEngineType = engine_type_e.FORD_ASPIRE_1996.ordinal();
|
||||
sendBlockingCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 3, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sendBlockingCommand("set " + Integration.CMD_ENGINE_TYPE + " " + 3, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sleepSeconds(2);
|
||||
sendBlockingCommand(getEnableCommand("self_stimulation"), commandQueue);
|
||||
// IoUtil.changeRpm(1200);
|
||||
EcuTestHelper.currentEngineType = engine_type_e.DEFAULT_FRANKENSO.ordinal();
|
||||
sendBlockingCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 28, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sendBlockingCommand("set " + Integration.CMD_ENGINE_TYPE + " " + 28, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sleepSeconds(2);
|
||||
FileLog.MAIN.logLine("++++++++++++++++++++++++++++++++++++ " + i + " +++++++++++++++");
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi;
|
|||
|
||||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.EngineState;
|
||||
import com.rusefi.core.ISensorCentral;
|
||||
import com.rusefi.core.Sensor;
|
||||
|
@ -17,7 +18,7 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.devexperts.logging.Logging.getLogging;
|
||||
import static com.rusefi.config.generated.Fields.CMD_RPM;
|
||||
import static com.rusefi.config.generated.Integration.CMD_RPM;
|
||||
import static com.rusefi.waves.EngineReport.isCloseEnough;
|
||||
|
||||
/**
|
||||
|
@ -37,15 +38,15 @@ public class IoUtil {
|
|||
}
|
||||
|
||||
public static String getSetCommand(String settingName) {
|
||||
return Fields.CMD_SET + " " + settingName;
|
||||
return Integration.CMD_SET + " " + settingName;
|
||||
}
|
||||
|
||||
public static String getEnableCommand(String settingName) {
|
||||
return Fields.CMD_ENABLE + " " + settingName;
|
||||
return Integration.CMD_ENABLE + " " + settingName;
|
||||
}
|
||||
|
||||
public static String getDisableCommand(String settingName) {
|
||||
return Fields.CMD_DISABLE + " " + settingName;
|
||||
return Integration.CMD_DISABLE + " " + settingName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +86,7 @@ public class IoUtil {
|
|||
|
||||
if (!isCloseEnough(rpm, actualRpm))
|
||||
throw new IllegalStateException("rpm change did not happen: " + rpm + ", actual " + actualRpm);
|
||||
// sendCommand(Fields.CMD_RESET_ENGINE_SNIFFER);
|
||||
// sendCommand(Integration.CMD_RESET_ENGINE_SNIFFER);
|
||||
log.info("AUTOTEST RPM change [" + rpm + "] executed in " + (System.currentTimeMillis() - time));
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi;
|
|||
|
||||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.EngineState;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
|
@ -112,7 +113,7 @@ public class TestingUtils {
|
|||
}
|
||||
|
||||
static String getNextWaveChart(CommandQueue commandQueue) {
|
||||
IoUtil.sendBlockingCommand(Fields.CMD_RESET_ENGINE_SNIFFER, commandQueue);
|
||||
IoUtil.sendBlockingCommand(Integration.CMD_RESET_ENGINE_SNIFFER, commandQueue);
|
||||
String result = getEngineChart(commandQueue);
|
||||
FileLog.MAIN.logLine("current chart: " + result);
|
||||
return result;
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.f4discovery;
|
|||
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.SensorType;
|
||||
|
@ -14,7 +15,7 @@ import java.util.Arrays;
|
|||
|
||||
import static com.rusefi.IoUtil.getEnableCommand;
|
||||
import static com.rusefi.TestingUtils.assertNull;
|
||||
import static com.rusefi.config.generated.Fields.CMD_SET_SENSOR_MOCK;
|
||||
import static com.rusefi.config.generated.Integration.CMD_SET_SENSOR_MOCK;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
@ -275,7 +276,7 @@ public class CommonFunctionalTest extends RusefiTestBase {
|
|||
public void test1995DodgeNeon() {
|
||||
ecu.setEngineType(engine_type_e.DODGE_NEON_1995);
|
||||
EngineChart chart;
|
||||
sendComplexCommand(Fields.CMD_INDIVIDUAL_INJECTION);
|
||||
sendComplexCommand(Integration.CMD_INDIVIDUAL_INJECTION);
|
||||
/**
|
||||
* note that command order matters - RPM change resets wave chart
|
||||
*/
|
||||
|
@ -398,7 +399,7 @@ public class CommonFunctionalTest extends RusefiTestBase {
|
|||
assertWaveNotNull(chart, EngineChart.SPARK_1);
|
||||
|
||||
// let's enable more channels dynamically
|
||||
sendComplexCommand(Fields.CMD_INDIVIDUAL_INJECTION);
|
||||
sendComplexCommand(Integration.CMD_INDIVIDUAL_INJECTION);
|
||||
chart = nextChart();
|
||||
assertWaveNotNull("Switching Aspire into INDIVIDUAL_COILS mode", chart, EngineChart.SPARK_2);
|
||||
assertWaveNotNull(chart, EngineChart.SPARK_3);
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.rusefi.enums.engine_type_e;
|
|||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.rusefi.config.generated.Fields.CMD_ENGINESNIFFERRPMTHRESHOLD;
|
||||
import static com.rusefi.config.generated.Integration.CMD_ENGINESNIFFERRPMTHRESHOLD;
|
||||
import static com.rusefi.functional_tests.EcuTestHelper.FAIL;
|
||||
|
||||
public class HighRevTest extends RusefiTestBase {
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.rusefi.IoUtil;
|
|||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
|
@ -39,7 +40,7 @@ public class PwmHardwareTest extends RusefiTestBase {
|
|||
public void scheduleBurnDoesNotAffectTriggerIssue2839() {
|
||||
ecu.setEngineType(engine_type_e.FORD_ASPIRE_1996);
|
||||
ecu.sendCommand(IoUtil.setTriggerType(com.rusefi.enums.trigger_type_e.TT_TOOTHED_WHEEL_60_2));
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.sendCommand(getDisableCommand(Integration.CMD_SELF_STIMULATION));
|
||||
ecu.sendCommand(getEnableCommand(CMD_EXTERNAL_STIMULATION));
|
||||
ecu.changeRpm(1200);
|
||||
nextChart();
|
||||
|
@ -82,7 +83,7 @@ public class PwmHardwareTest extends RusefiTestBase {
|
|||
ecu.sendCommand(CMD_LOGIC_PIN + " 0 PA5");
|
||||
ecu.sendCommand(CMD_WRITECONFIG);
|
||||
sleep(2 * Timeouts.SECOND);
|
||||
ecu.sendCommand(getEnableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.sendCommand(getEnableCommand(Integration.CMD_SELF_STIMULATION));
|
||||
|
||||
sleep(2 * Timeouts.SECOND);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.rusefi.autotest.ControllerConnectorState;
|
|||
import com.rusefi.IoUtil;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.ISensorCentral;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
|
@ -83,9 +84,9 @@ public class EcuTestHelper {
|
|||
public static EcuTestHelper createInstance(boolean allowHardwareTriggerInput) {
|
||||
EcuTestHelper ecu = new EcuTestHelper(ControllerConnectorState.getLinkManager());
|
||||
if (allowHardwareTriggerInput) {
|
||||
ecu.sendCommand(getEnableCommand(Fields.CMD_TRIGGER_HW_INPUT));
|
||||
ecu.sendCommand(getEnableCommand(Integration.CMD_TRIGGER_HW_INPUT));
|
||||
} else {
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_TRIGGER_HW_INPUT));
|
||||
ecu.sendCommand(getDisableCommand(Integration.CMD_TRIGGER_HW_INPUT));
|
||||
}
|
||||
ecu.enableFunctionalMode();
|
||||
return ecu;
|
||||
|
@ -104,7 +105,7 @@ public class EcuTestHelper {
|
|||
* this seem to adjust engine sniffer behaviour
|
||||
*/
|
||||
public void enableFunctionalMode() {
|
||||
sendCommand(getEnableCommand(Fields.CMD_FUNCTIONAL_TEST_MODE));
|
||||
sendCommand(getEnableCommand(Integration.CMD_FUNCTIONAL_TEST_MODE));
|
||||
}
|
||||
|
||||
public void changeRpm(final int rpm) {
|
||||
|
@ -122,18 +123,18 @@ public class EcuTestHelper {
|
|||
* - waiting for scheduled actuator actions to run out
|
||||
* - disabling PWM
|
||||
*/
|
||||
sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
sendCommand(getDisableCommand(Fields.CMD_INJECTION));
|
||||
sendCommand(getDisableCommand(Fields.CMD_IGNITION));
|
||||
sendCommand(getDisableCommand(Fields.CMD_PWM));
|
||||
sendCommand(getDisableCommand(Integration.CMD_SELF_STIMULATION));
|
||||
sendCommand(getDisableCommand(Integration.CMD_INJECTION));
|
||||
sendCommand(getDisableCommand(Integration.CMD_IGNITION));
|
||||
sendCommand(getDisableCommand(Integration.CMD_PWM));
|
||||
// changing engine type while engine is running does not work well - we rightfully
|
||||
// get invalid configuration critical errors
|
||||
sleepSeconds(2);
|
||||
sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + type, Timeouts.SET_ENGINE_TIMEOUT);
|
||||
sendCommand("set " + Integration.CMD_ENGINE_TYPE + " " + type, Timeouts.SET_ENGINE_TIMEOUT);
|
||||
// TODO: document the reason for this sleep?!
|
||||
sleepSeconds(1);
|
||||
sendCommand(getEnableCommand(Fields.CMD_PWM));
|
||||
sendCommand(getEnableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
sendCommand(getEnableCommand(Integration.CMD_PWM));
|
||||
sendCommand(getEnableCommand(Integration.CMD_SELF_STIMULATION));
|
||||
// // we need to skip one chart since it might have been produced with previous engine type
|
||||
// TestingUtils.nextChart(commandQueue);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.devexperts.logging.Logging;
|
|||
import com.rusefi.IoUtil;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.bench_mode_e;
|
||||
|
@ -53,7 +54,7 @@ public class SimulatorFunctionalTest {
|
|||
testOutputPin(bench_mode_e.BENCH_STARTER_ENABLE_RELAY, Fields.BENCH_STARTER_DURATION);
|
||||
EcuTestHelper ecu = new EcuTestHelper(linkManager);
|
||||
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.sendCommand(getDisableCommand(Integration.CMD_SELF_STIMULATION));
|
||||
IoUtil.awaitRpm(0);
|
||||
|
||||
testOutputPin(bench_mode_e.BENCH_VVT0_VALVE, Fields.BENCH_VVT_DURATION);
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.rusefi.io;
|
|||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.Listener;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.util.IoUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -39,7 +40,7 @@ public class CommandQueue {
|
|||
|
||||
private static boolean isSlowCommand(String cmd) {
|
||||
String lc = cmd.toLowerCase();
|
||||
return lc.startsWith("set " + Fields.CMD_ENGINE_TYPE) || lc.startsWith("writeconfig") || lc.startsWith("rewriteconfig");
|
||||
return lc.startsWith("set " + Integration.CMD_ENGINE_TYPE) || lc.startsWith("writeconfig") || lc.startsWith("rewriteconfig");
|
||||
}
|
||||
|
||||
public static int getTimeout(String cmd) {
|
||||
|
|
|
@ -1,6 +1,54 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
public class Integration {
|
||||
public static final String CMD_AC_RELAY_BENCH = "acrelaybench";
|
||||
public static final String CMD_ALTERNATOR_PIN = "set_alternator_pin";
|
||||
public static final String CMD_BOOST_PIN = "set_boost_pin";
|
||||
public static final String CMD_BURNCONFIG = "burnconfig";
|
||||
public static final String CMD_DATE = "date";
|
||||
public static final String CMD_DISABLE = "disable";
|
||||
public static final String CMD_ECU_UNLOCK = "unlock";
|
||||
public static final String CMD_ENABLE = "enable";
|
||||
public static final String CMD_ENGINE_TYPE = "engine_type";
|
||||
public static final String CMD_ENGINESNIFFERRPMTHRESHOLD = "engineSnifferRpmThreshold";
|
||||
public static final String CMD_ETB_DUTY = "set_etb_duty";
|
||||
public static final String CMD_EXTERNAL_STIMULATION = "ext_stimulation";
|
||||
public static final String CMD_FAN2_BENCH = "fan2bench";
|
||||
public static final String CMD_FAN_BENCH = "fanbench";
|
||||
public static final String CMD_FUEL_BENCH = "fuelbench";
|
||||
public static final String CMD_FUEL_PUMP_BENCH = "fuelpumpbench";
|
||||
public static final String CMD_FUNCTIONAL_TEST_MODE = "test_mode";
|
||||
public static final String CMD_GET = "get";
|
||||
public static final String CMD_HPFP_BENCH = "hpfpbench";
|
||||
public static final String CMD_IDLE_BENCH = "idlebench";
|
||||
public static final String CMD_IDLE_PIN = "set_idle_pin";
|
||||
public static final String CMD_IGNITION = "ignition";
|
||||
public static final String CMD_IGNITION_PIN = "set_ignition_pin";
|
||||
public static final String CMD_INDIVIDUAL_INJECTION = "set_individual_coils_ignition";
|
||||
public static final String CMD_INJECTION = "injection";
|
||||
public static final String CMD_INJECTION_PIN = "set_injection_pin";
|
||||
public static final String CMD_LOGIC_PIN = "set_logic_input_pin";
|
||||
public static final String CMD_MIL_BENCH = "milbench";
|
||||
public static final String CMD_PINS = "pins";
|
||||
public static final String CMD_PWM = "pwm";
|
||||
public static final String CMD_REBOOT = "reboot";
|
||||
public static final String CMD_REBOOT_DFU = "reboot_dfu";
|
||||
public static final String CMD_REBOOT_OPENBLT = "reboot_openblt";
|
||||
public static final String CMD_RESET_ENGINE_SNIFFER = "reset_engine_chart";
|
||||
public static final String CMD_RESET_SENSOR_MOCKS = "reset_sensor_mocks";
|
||||
public static final String CMD_RESET_SIMULATOR = "reset_simulator";
|
||||
public static final String CMD_RPM = "rpm";
|
||||
public static final String CMD_SELF_STIMULATION = "self_stimulation";
|
||||
public static final String CMD_SET = "set";
|
||||
public static final String CMD_SET_SENSOR_MOCK = "set_sensor_mock";
|
||||
public static final String CMD_SPARK_BENCH = "sparkbench";
|
||||
public static final String CMD_STARTER_BENCH = "starterbench";
|
||||
public static final String CMD_TRIGGER_HW_INPUT = "trigger_hw_input";
|
||||
public static final String CMD_TRIGGER_PIN = "set_trigger_input_pin";
|
||||
public static final String CMD_TRIGGER_SIMULATOR_PIN = "set_trigger_simulator_pin";
|
||||
public static final String CMD_TRIGGERINFO = "triggerinfo";
|
||||
public static final String CMD_VSS_PIN = "vss_pin";
|
||||
public static final String CMD_WRITECONFIG = "writeconfig";
|
||||
public static final char TS_CHUNK_WRITE_COMMAND = 'C';
|
||||
public static final char TS_EXECUTE = 'E';
|
||||
public static final char TS_GET_COMPOSITE_BUFFER_DONE_DIFFERENTLY = '8';
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi;
|
|||
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.preferences.storage.PersistentConfiguration;
|
||||
import com.rusefi.ui.MessagesView;
|
||||
import com.rusefi.ui.UIContext;
|
||||
|
@ -36,13 +37,13 @@ public class BenchTestPane {
|
|||
content.add(new CommandControl(uiContext, "Reboot", "", "Reboot") {
|
||||
@Override
|
||||
protected String getCommand() {
|
||||
return Fields.CMD_REBOOT;
|
||||
return Integration.CMD_REBOOT;
|
||||
}
|
||||
}.getContent());
|
||||
content.add(new CommandControl(uiContext,"Reboot to DFU", "", "Reboot to DFU") {
|
||||
@Override
|
||||
protected String getCommand() {
|
||||
return Fields.CMD_REBOOT_DFU;
|
||||
return Integration.CMD_REBOOT_DFU;
|
||||
}
|
||||
}.getContent());
|
||||
content.add(new MessagesView(config.getRoot()).messagesScroll);
|
||||
|
@ -62,7 +63,7 @@ public class BenchTestPane {
|
|||
CommandControl panel = new CommandControl(uiContext,"MIL", "check_engine.jpg", TEST) {
|
||||
@NotNull
|
||||
protected String getCommand() {
|
||||
return Fields.CMD_MIL_BENCH;
|
||||
return Integration.CMD_MIL_BENCH;
|
||||
}
|
||||
};
|
||||
return panel.getContent();
|
||||
|
|
|
@ -25,7 +25,7 @@ public class UploadChanges {
|
|||
wnd.getFrameHelper().initFrame(wnd.getContent(), false);
|
||||
|
||||
JPanel bottomPanel = new JPanel(new FlowLayout());
|
||||
// bottomPanel.add(RecentCommands.createButton(new AtomicBoolean(), Fields.CMD_WRITECONFIG));
|
||||
// bottomPanel.add(RecentCommands.createButton(new AtomicBoolean(), Integration.CMD_WRITECONFIG));
|
||||
wnd.getContent().add(bottomPanel, BorderLayout.SOUTH);
|
||||
|
||||
if (args.length != 1) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.rusefi.Launcher;
|
|||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.autodetect.PortDetector;
|
||||
import com.rusefi.autodetect.SerialAutoChecker;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.FindFileHelper;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.io.DfuHelper;
|
||||
|
@ -46,7 +47,7 @@ public class DfuFlasher {
|
|||
return;
|
||||
}
|
||||
|
||||
AtomicBoolean isSignatureValidated = rebootToDfu(parent, port, callbacks, Fields.CMD_REBOOT_DFU);
|
||||
AtomicBoolean isSignatureValidated = rebootToDfu(parent, port, callbacks, Integration.CMD_REBOOT_DFU);
|
||||
if (isSignatureValidated == null)
|
||||
return;
|
||||
if (isSignatureValidated.get()) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.rusefi.maintenance;
|
||||
|
||||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.FindFileHelper;
|
||||
import com.rusefi.FileLog;
|
||||
import com.rusefi.Launcher;
|
||||
|
@ -140,12 +141,12 @@ public class ProgramSelector {
|
|||
|
||||
private static void rebootToDfu(JComponent parent, String selectedPort, UpdateOperationCallbacks callbacks) {
|
||||
String port = selectedPort == null ? PortDetector.AUTO : selectedPort;
|
||||
DfuFlasher.rebootToDfu(parent, port, callbacks, Fields.CMD_REBOOT_DFU);
|
||||
DfuFlasher.rebootToDfu(parent, port, callbacks, Integration.CMD_REBOOT_DFU);
|
||||
}
|
||||
|
||||
private static void rebootToOpenblt(JComponent parent, String selectedPort, UpdateOperationCallbacks callbacks) {
|
||||
String port = selectedPort == null ? PortDetector.AUTO : selectedPort;
|
||||
DfuFlasher.rebootToDfu(parent, port, callbacks, Fields.CMD_REBOOT_OPENBLT);
|
||||
DfuFlasher.rebootToDfu(parent, port, callbacks, Integration.CMD_REBOOT_OPENBLT);
|
||||
}
|
||||
|
||||
private static void flashOpenBltCan(JComponent parent, UpdateOperationCallbacks callbacks) {
|
||||
|
|
|
@ -113,9 +113,9 @@ public class ConsoleTools {
|
|||
sendCommand(command);
|
||||
}
|
||||
}, "Sends command specified as second argument");
|
||||
registerTool("reboot_ecu", args -> sendCommand(Fields.CMD_REBOOT), "Sends a command to reboot rusEFI controller.");
|
||||
registerTool(Fields.CMD_REBOOT_DFU, args -> {
|
||||
sendCommand(Fields.CMD_REBOOT_DFU);
|
||||
registerTool("reboot_ecu", args -> sendCommand(Integration.CMD_REBOOT), "Sends a command to reboot rusEFI controller.");
|
||||
registerTool(Integration.CMD_REBOOT_DFU, args -> {
|
||||
sendCommand(Integration.CMD_REBOOT_DFU);
|
||||
/**
|
||||
* AndreiKA reports that auto-detect fails to interrupt communication threads while in native code
|
||||
* See https://github.com/rusefi/rusefi/issues/3300
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.ui;
|
|||
|
||||
import com.devexperts.logging.Logging;
|
||||
import com.rusefi.AverageAnglesUtil;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.ui.AutoupdateUtil;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.core.MessagesCentral;
|
||||
|
@ -19,8 +20,8 @@ import java.util.List;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static com.rusefi.IoUtil.*;
|
||||
import static com.rusefi.config.generated.Fields.CMD_DATE;
|
||||
import static com.rusefi.config.generated.Fields.CMD_TRIGGERINFO;
|
||||
import static com.rusefi.config.generated.Integration.CMD_DATE;
|
||||
import static com.rusefi.config.generated.Integration.CMD_TRIGGERINFO;
|
||||
import static com.rusefi.core.preferences.storage.PersistentConfiguration.getConfig;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +63,7 @@ public class RecentCommands {
|
|||
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
||||
COMMAND_ICONS.put(SDINFO, AutoupdateUtil.loadIcon("sdinfo.jpg"));
|
||||
COMMAND_ICONS.put(PINS, infoIcon);
|
||||
COMMAND_ICONS.put(Fields.CMD_WRITECONFIG, AutoupdateUtil.loadIcon("writeconfig.jpg"));
|
||||
COMMAND_ICONS.put(Integration.CMD_WRITECONFIG, AutoupdateUtil.loadIcon("writeconfig.jpg"));
|
||||
}
|
||||
|
||||
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
||||
|
@ -110,7 +111,7 @@ public class RecentCommands {
|
|||
add(CMD_TRIGGERINFO);
|
||||
add(TSINFO);
|
||||
add(CANINFO);
|
||||
add(Fields.CMD_WRITECONFIG);
|
||||
add(Integration.CMD_WRITECONFIG);
|
||||
add("rewriteconfig");
|
||||
|
||||
add(getEnableCommand("injection"));
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.devexperts.logging.Logging;
|
|||
import com.rusefi.*;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.core.EngineState;
|
||||
import com.rusefi.io.*;
|
||||
import com.rusefi.io.tcp.BinaryProtocolServer;
|
||||
|
@ -71,7 +72,7 @@ public class MainFrame {
|
|||
if (ConnectionStatusLogic.INSTANCE.getValue() == ConnectionStatusValue.CONNECTED) {
|
||||
LocalDateTime dateTime = LocalDateTime.now(ZoneOffset.systemDefault());
|
||||
String isoDateTime = dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);
|
||||
consoleUI.uiContext.getLinkManager().execute(() -> consoleUI.uiContext.getCommandQueue().write(IoUtil.getSetCommand(Fields.CMD_DATE) +
|
||||
consoleUI.uiContext.getLinkManager().execute(() -> consoleUI.uiContext.getCommandQueue().write(IoUtil.getSetCommand(Integration.CMD_DATE) +
|
||||
" " + isoDateTime, CommandQueue.DEFAULT_TIMEOUT,
|
||||
InvocationConfirmationListener.VOID, false));
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.rusefi.config.Field;
|
|||
import com.rusefi.config.FieldType;
|
||||
import com.rusefi.config.FieldsMap;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.ui.RecentCommands;
|
||||
import com.rusefi.ui.UIContext;
|
||||
import com.rusefi.ui.config.*;
|
||||
|
@ -121,7 +122,7 @@ public class SettingsTab {
|
|||
|
||||
panel.add(dialogBody);
|
||||
|
||||
panel.add(UiUtils.wrap(RecentCommands.createButton(uiContext, new AtomicBoolean(), Fields.CMD_WRITECONFIG)));
|
||||
panel.add(UiUtils.wrap(RecentCommands.createButton(uiContext, new AtomicBoolean(), Integration.CMD_WRITECONFIG)));
|
||||
|
||||
JLabel unusable = new JLabel("This is painfully unusable, TunerStudio works way better for settings!");
|
||||
unusable.setForeground(Color.red);
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Collection;
|
|||
import java.util.Hashtable;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static com.rusefi.config.generated.Fields.CMD_SET_SENSOR_MOCK;
|
||||
import static com.rusefi.config.generated.Integration.CMD_SET_SENSOR_MOCK;
|
||||
|
||||
/**
|
||||
* Andrey Belomutskiy, (c) 2013-2020
|
||||
|
|
Loading…
Reference in New Issue