just Sensor rename

This commit is contained in:
rusefillc 2022-04-16 00:39:28 -04:00
parent 31c751d5cc
commit 24ebcc8989
6 changed files with 12 additions and 14 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.INT_TEMP);
mcuTemp = SensorCentral.getInstance().getValue(Sensor.internalMcuTemperature);
}
System.out.println("MCU temperature is " + mcuTemp + " deg C");

View File

@ -3,14 +3,12 @@ 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.*;
@ -39,14 +37,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.VSS));
EcuTestHelper.assertSomewhatClose("VSS no input", 0, SensorCentral.getInstance().getValue(Sensor.vehicleSpeedKph));
// 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.VSS));
EcuTestHelper.assertSomewhatClose("VSS with input", 92, SensorCentral.getInstance().getValue(Sensor.vehicleSpeedKph));
// 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

@ -26,11 +26,11 @@ public enum Sensor {
// 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"),
speedToRpmRatio("SpeedToRpm", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 6, 1.0 / PACK_MULT_PERCENT, 0, 5, "RPM/kph"),
vehicleSpeedKph(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"),
internalMcuTemperature(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"),

View File

@ -20,7 +20,7 @@ public class BinarySensorLogSandbox {
BinarySensorLog l = new BinarySensorLog(valueProvider,
Sensor.TIME_SECONDS,
Sensor.RPMValue,
Sensor.VSS,
Sensor.vehicleSpeedKph,
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.VSS, 60.0);
values.put(Sensor.vehicleSpeedKph, 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.INT_TEMP,
Sensor.internalMcuTemperature,
Sensor.engineMode,
Sensor.CLT,
@ -70,8 +70,8 @@ public class SensorLogger {
Sensor.vvtTargetB2I,
Sensor.vvtTargetB2E,
Sensor.VSS,
Sensor.SPEED2RPM,
Sensor.vehicleSpeedKph,
Sensor.speedToRpmRatio,
Sensor.turboSpeed,
Sensor.accelerationX,

View File

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