rename rollback
This commit is contained in:
parent
c2f2867daa
commit
75cb689109
|
@ -23,7 +23,7 @@ public class MiscTest extends RusefiTestBase {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
while (Double.isNaN(mcuTemp) && (System.currentTimeMillis() - start) < 5 * SECOND) {
|
while (Double.isNaN(mcuTemp) && (System.currentTimeMillis() - start) < 5 * SECOND) {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
mcuTemp = SensorCentral.getInstance().getValue(Sensor.internalMcuTemperature);
|
mcuTemp = SensorCentral.getInstance().getValue(Sensor.INT_TEMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("MCU temperature is " + mcuTemp + " deg C");
|
System.out.println("MCU temperature is " + mcuTemp + " deg C");
|
||||||
|
|
|
@ -3,12 +3,14 @@ package com.rusefi.f4discovery;
|
||||||
import com.rusefi.autotest.ControllerConnectorState;
|
import com.rusefi.autotest.ControllerConnectorState;
|
||||||
import com.rusefi.RusefiTestBase;
|
import com.rusefi.RusefiTestBase;
|
||||||
import com.rusefi.Timeouts;
|
import com.rusefi.Timeouts;
|
||||||
|
import com.rusefi.config.generated.Fields;
|
||||||
import com.rusefi.core.Sensor;
|
import com.rusefi.core.Sensor;
|
||||||
import com.rusefi.core.SensorCentral;
|
import com.rusefi.core.SensorCentral;
|
||||||
import com.rusefi.enums.engine_type_e;
|
import com.rusefi.enums.engine_type_e;
|
||||||
import com.rusefi.functional_tests.EcuTestHelper;
|
import com.rusefi.functional_tests.EcuTestHelper;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static com.rusefi.IoUtil.getEnableCommand;
|
||||||
import static com.rusefi.binaryprotocol.BinaryProtocol.sleep;
|
import static com.rusefi.binaryprotocol.BinaryProtocol.sleep;
|
||||||
import static com.rusefi.config.generated.Fields.*;
|
import static com.rusefi.config.generated.Fields.*;
|
||||||
|
|
||||||
|
@ -37,14 +39,14 @@ public class VssHardwareLoopTest extends RusefiTestBase {
|
||||||
ecu.sendCommand(CMD_IDLE_PIN + " PD2");
|
ecu.sendCommand(CMD_IDLE_PIN + " PD2");
|
||||||
ecu.sendCommand("set idle_solenoid_freq 1000");
|
ecu.sendCommand("set idle_solenoid_freq 1000");
|
||||||
|
|
||||||
EcuTestHelper.assertSomewhatClose("VSS no input", 0, SensorCentral.getInstance().getValue(Sensor.vehicleSpeedKph));
|
EcuTestHelper.assertSomewhatClose("VSS no input", 0, SensorCentral.getInstance().getValue(Sensor.VSS));
|
||||||
|
|
||||||
// attaching VSS to idle output since there is a jumper on test discovery
|
// attaching VSS to idle output since there is a jumper on test discovery
|
||||||
ecu.sendCommand("set " + CMD_VSS_PIN + " pa5");
|
ecu.sendCommand("set " + CMD_VSS_PIN + " pa5");
|
||||||
|
|
||||||
sleep(2 * Timeouts.SECOND);
|
sleep(2 * Timeouts.SECOND);
|
||||||
|
|
||||||
EcuTestHelper.assertSomewhatClose("VSS with input", 92, SensorCentral.getInstance().getValue(Sensor.vehicleSpeedKph));
|
EcuTestHelper.assertSomewhatClose("VSS with input", 92, SensorCentral.getInstance().getValue(Sensor.VSS));
|
||||||
|
|
||||||
// not related to VSS test, just need to validate this somewhere, so this random test is as good as any
|
// not related to VSS test, just need to validate this somewhere, so this random test is as good as any
|
||||||
if (ControllerConnectorState.firmwareVersion == null)
|
if (ControllerConnectorState.firmwareVersion == null)
|
||||||
|
|
|
@ -24,12 +24,13 @@ public enum Sensor {
|
||||||
* Please note that these enum names are used to make 'set_mock_XXX_voltage' commands
|
* Please note that these enum names are used to make 'set_mock_XXX_voltage' commands
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RPMValue("RPM", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 4, 1.0, 0.0, 8000.0, "RPM"),
|
// RPM, vss
|
||||||
rpmAcceleration("dRPM", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 6, 1.0, 0.0, 5.0, "RPM/s"),
|
RPMValue(GAUGE_NAME_RPM, SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 4, 1, 0, 8000, "RPM"),
|
||||||
speedToRpmRatio("Gearbox Ratio", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 8, 0.01, 0.0, 0.0, "value"),
|
SPEED2RPM("SpeedToRpm", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 6, 1.0 / PACK_MULT_PERCENT, 0, 5, "RPM/kph"),
|
||||||
vehicleSpeedKph("Vehicle Speed", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 10, 1.0, 0.0, 0.0, "kph"),
|
VSS(GAUGE_NAME_VVS, SensorCategory.OPERATIONS, FieldType.UINT8, 10, 1, 0, 150, "kph"),
|
||||||
internalMcuTemperature("CPU Temperature", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 11, 1.0, 0.0, 0.0, "deg C"),
|
|
||||||
|
|
||||||
|
// Temperatures
|
||||||
|
INT_TEMP(GAUGE_NAME_CPU_TEMP, SensorCategory.OPERATIONS, FieldType.INT8, 11, 1, 0, 5, "C"),
|
||||||
CLT(GAUGE_NAME_CLT, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 12, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
CLT(GAUGE_NAME_CLT, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 12, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
||||||
IAT(GAUGE_NAME_IAT, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 14, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
IAT(GAUGE_NAME_IAT, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 14, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
||||||
AuxT1("AuxT1", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 16, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
AuxT1("AuxT1", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 16, 1.0 / PACK_MULT_TEMPERATURE, -40, 150, "deg C"),
|
||||||
|
@ -157,20 +158,6 @@ public enum Sensor {
|
||||||
|
|
||||||
// Synthetic (console only) channels
|
// Synthetic (console only) channels
|
||||||
ETB_CONTROL_QUALITY("ETB metric", SensorCategory.SNIFFING, "", 100),
|
ETB_CONTROL_QUALITY("ETB metric", SensorCategory.SNIFFING, "", 100),
|
||||||
|
|
||||||
cranking("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 780, 1.0, -1.0, -1.0, ""),
|
|
||||||
running("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 800, 1.0, -1.0, -1.0, ""),
|
|
||||||
etbFeedForward("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 828, 1.0, -1.0, -1.0, ""),
|
|
||||||
targetFromTable("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 832, 1.0, -1.0, -1.0, ""),
|
|
||||||
sparkDwell("ignition dwell duration in ms\nSee also dwellAngle", SensorCategory.SENSOR_INPUTS, FieldType.INT, 836, 1.0, -1.0, -1.0, ""),
|
|
||||||
dwellAngle("ignition dwell duration as crankshaft angle\nNAN if engine is stopped\nSee also sparkDwell", SensorCategory.SENSOR_INPUTS, FieldType.INT, 840, 1.0, -1.0, -1.0, ""),
|
|
||||||
|
|
||||||
baseDwell("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 972, 1.0, -1.0, -1.0, ""),
|
|
||||||
dwellVoltageCorrection("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 976, 1.0, -1.0, -1.0, ""),
|
|
||||||
etb_idlePosition("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 980, 1.0, -1.0, -1.0, ""),
|
|
||||||
trim("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 984, 1.0, -1.0, -1.0, ""),
|
|
||||||
luaAdjustment("", SensorCategory.SENSOR_INPUTS, FieldType.INT, 988, 1.0, -1.0, -1.0, ""),
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class BinarySensorLogSandbox {
|
||||||
BinarySensorLog l = new BinarySensorLog(valueProvider,
|
BinarySensorLog l = new BinarySensorLog(valueProvider,
|
||||||
Sensor.TIME_SECONDS,
|
Sensor.TIME_SECONDS,
|
||||||
Sensor.RPMValue,
|
Sensor.RPMValue,
|
||||||
Sensor.vehicleSpeedKph,
|
Sensor.VSS,
|
||||||
Sensor.TPS,
|
Sensor.TPS,
|
||||||
Sensor.tpsAccelFuel,
|
Sensor.tpsAccelFuel,
|
||||||
Sensor.PPS,
|
Sensor.PPS,
|
||||||
|
@ -35,7 +35,7 @@ public class BinarySensorLogSandbox {
|
||||||
|
|
||||||
values.put(Sensor.TIME_SECONDS, 1.0);
|
values.put(Sensor.TIME_SECONDS, 1.0);
|
||||||
values.put(Sensor.RPMValue, 0.0);
|
values.put(Sensor.RPMValue, 0.0);
|
||||||
values.put(Sensor.vehicleSpeedKph, 60.0);
|
values.put(Sensor.VSS, 60.0);
|
||||||
values.put(Sensor.FIRMWARE_VERSION, 20200101.0);
|
values.put(Sensor.FIRMWARE_VERSION, 20200101.0);
|
||||||
values.put(Sensor.CLT, 29.0);
|
values.put(Sensor.CLT, 29.0);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||||
public class SensorLogger {
|
public class SensorLogger {
|
||||||
protected static Sensor[] SENSORS = {Sensor.RPMValue,
|
protected static Sensor[] SENSORS = {Sensor.RPMValue,
|
||||||
Sensor.TIME_SECONDS,
|
Sensor.TIME_SECONDS,
|
||||||
Sensor.internalMcuTemperature,
|
Sensor.INT_TEMP,
|
||||||
|
|
||||||
Sensor.engineMode,
|
Sensor.engineMode,
|
||||||
Sensor.CLT,
|
Sensor.CLT,
|
||||||
|
@ -70,8 +70,8 @@ public class SensorLogger {
|
||||||
Sensor.vvtTargetB2I,
|
Sensor.vvtTargetB2I,
|
||||||
Sensor.vvtTargetB2E,
|
Sensor.vvtTargetB2E,
|
||||||
|
|
||||||
Sensor.vehicleSpeedKph,
|
Sensor.VSS,
|
||||||
Sensor.speedToRpmRatio,
|
Sensor.SPEED2RPM,
|
||||||
Sensor.turboSpeed,
|
Sensor.turboSpeed,
|
||||||
|
|
||||||
Sensor.accelerationX,
|
Sensor.accelerationX,
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class GaugesPanel {
|
||||||
Sensor.lastErrorCode,
|
Sensor.lastErrorCode,
|
||||||
Sensor.Lambda,
|
Sensor.Lambda,
|
||||||
Sensor.VBATT,
|
Sensor.VBATT,
|
||||||
Sensor.vehicleSpeedKph,
|
Sensor.VSS,
|
||||||
|
|
||||||
};
|
};
|
||||||
private static final String GAUGES_ROWS = "gauges_rows";
|
private static final String GAUGES_ROWS = "gauges_rows";
|
||||||
|
|
Loading…
Reference in New Issue