rename rollback

This commit is contained in:
rusefillc 2022-04-16 01:38:40 -04:00
parent e006a67cc0
commit 9780648859
6 changed files with 17 additions and 28 deletions

View File

@ -23,7 +23,7 @@ public class MiscTest extends RusefiTestBase {
long start = System.currentTimeMillis();
while (Double.isNaN(mcuTemp) && (System.currentTimeMillis() - start) < 5 * SECOND) {
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");

View File

@ -3,12 +3,14 @@ package com.rusefi.f4discovery;
import com.rusefi.autotest.ControllerConnectorState;
import com.rusefi.RusefiTestBase;
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;
import static com.rusefi.IoUtil.getEnableCommand;
import static com.rusefi.binaryprotocol.BinaryProtocol.sleep;
import static com.rusefi.config.generated.Fields.*;
@ -37,14 +39,14 @@ public class VssHardwareLoopTest extends RusefiTestBase {
ecu.sendCommand(CMD_IDLE_PIN + " PD2");
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
ecu.sendCommand("set " + CMD_VSS_PIN + " pa5");
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
if (ControllerConnectorState.firmwareVersion == null)

View File

@ -24,12 +24,13 @@ public enum Sensor {
* 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"),
rpmAcceleration("dRPM", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 6, 1.0, 0.0, 5.0, "RPM/s"),
speedToRpmRatio("Gearbox Ratio", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 8, 0.01, 0.0, 0.0, "value"),
vehicleSpeedKph("Vehicle Speed", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 10, 1.0, 0.0, 0.0, "kph"),
internalMcuTemperature("CPU Temperature", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 11, 1.0, 0.0, 0.0, "deg C"),
// RPM, vss
RPMValue(GAUGE_NAME_RPM, SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 4, 1, 0, 8000, "RPM"),
SPEED2RPM("SpeedToRpm", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 6, 1.0 / PACK_MULT_PERCENT, 0, 5, "RPM/kph"),
VSS(GAUGE_NAME_VVS, SensorCategory.OPERATIONS, FieldType.UINT8, 10, 1, 0, 150, "kph"),
// 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"),
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"),
@ -157,20 +158,6 @@ public enum Sensor {
// Synthetic (console only) channels
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;

View File

@ -20,7 +20,7 @@ public class BinarySensorLogSandbox {
BinarySensorLog l = new BinarySensorLog(valueProvider,
Sensor.TIME_SECONDS,
Sensor.RPMValue,
Sensor.vehicleSpeedKph,
Sensor.VSS,
Sensor.TPS,
Sensor.tpsAccelFuel,
Sensor.PPS,
@ -35,7 +35,7 @@ public class BinarySensorLogSandbox {
values.put(Sensor.TIME_SECONDS, 1.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.CLT, 29.0);

View File

@ -16,7 +16,7 @@ import java.util.List;
public class SensorLogger {
protected static Sensor[] SENSORS = {Sensor.RPMValue,
Sensor.TIME_SECONDS,
Sensor.internalMcuTemperature,
Sensor.INT_TEMP,
Sensor.engineMode,
Sensor.CLT,
@ -70,8 +70,8 @@ public class SensorLogger {
Sensor.vvtTargetB2I,
Sensor.vvtTargetB2E,
Sensor.vehicleSpeedKph,
Sensor.speedToRpmRatio,
Sensor.VSS,
Sensor.SPEED2RPM,
Sensor.turboSpeed,
Sensor.accelerationX,

View File

@ -43,7 +43,7 @@ public class GaugesPanel {
Sensor.lastErrorCode,
Sensor.Lambda,
Sensor.VBATT,
Sensor.vehicleSpeedKph,
Sensor.VSS,
};
private static final String GAUGES_ROWS = "gauges_rows";