generate java enum from C enum? generate both C and java from yaml? #2102
This commit is contained in:
parent
383d8caad9
commit
6cbf18d824
|
@ -2,6 +2,7 @@ package com.rusefi;
|
|||
|
||||
import com.rusefi.autotest.ControllerConnectorState;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
import com.rusefi.io.LinkManager;
|
||||
|
@ -25,12 +26,12 @@ public class EnduranceTestUtility {
|
|||
CommandQueue commandQueue = linkManager.getCommandQueue();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
EcuTestHelper.currentEngineType = Fields.ET_FORD_ASPIRE;
|
||||
EcuTestHelper.currentEngineType = engine_type_e.FORD_ASPIRE_1996.ordinal();
|
||||
sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 3, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sleepSeconds(2);
|
||||
sendCommand(getEnableCommand("self_stimulation"), commandQueue);
|
||||
// IoUtil.changeRpm(1200);
|
||||
EcuTestHelper.currentEngineType = Fields.ET_DEFAULT_FRANKENSO;
|
||||
EcuTestHelper.currentEngineType = engine_type_e.DEFAULT_FRANKENSO.ordinal();
|
||||
sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 28, Timeouts.SET_ENGINE_TIMEOUT, commandQueue);
|
||||
sleepSeconds(2);
|
||||
FileLog.MAIN.logLine("++++++++++++++++++++++++++++++++++++ " + i + " +++++++++++++++");
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.rusefi.Timeouts;
|
|||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -35,7 +36,7 @@ public class PwmHardwareTest extends RusefiTestBase {
|
|||
|
||||
@Test
|
||||
public void scheduleBurnDoesNotAffectTriggerIssue2839() {
|
||||
ecu.setEngineType(ET_FORD_ASPIRE);
|
||||
ecu.setEngineType(engine_type_e.FORD_ASPIRE_1996);
|
||||
ecu.sendCommand("set " + "trigger_type" + " " + TT_TT_TOOTHED_WHEEL_60_2);
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.sendCommand(getEnableCommand(CMD_EXTERNAL_STIMULATION));
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.rusefi.config.generated.Fields;
|
|||
import com.rusefi.core.ISensorCentral;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.engine_type_e;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.waves.EngineReport;
|
||||
|
@ -115,6 +116,10 @@ public class EcuTestHelper {
|
|||
IoUtil.changeRpm(commandQueue, rpm);
|
||||
}
|
||||
|
||||
public void setEngineType(engine_type_e engine_type_e) {
|
||||
setEngineType(engine_type_e.ordinal());
|
||||
}
|
||||
|
||||
public void setEngineType(int type) {
|
||||
log.info("AUTOTEST setEngineType " + type);
|
||||
currentEngineType = type;
|
||||
|
|
Loading…
Reference in New Issue