parent
39d9f55d01
commit
ebb6f3033a
|
@ -58,4 +58,16 @@ public class ProteusAnalogTest extends RusefiTestBase {
|
|||
// 100% duty -> failed TPS (voltage too high)
|
||||
setIdlePositionAndAssertTps(98, 0);
|
||||
}
|
||||
|
||||
void assertSensorValue(Sensor sensor, double expected) {
|
||||
double actual = SensorCentral.getInstance().getValue(sensor);
|
||||
assertEquals(expected, actual, 0.5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnconnectedInputs() {
|
||||
// CLT/IAT inputs should float at ~5 volts
|
||||
assertSensorValue(Sensor.rawClt, 5.0);
|
||||
assertSensorValue(Sensor.rawIat, 5.0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,6 +118,10 @@ public enum Sensor {
|
|||
|
||||
tuneCrc16("tune crc16", SensorCategory.STATUS, FieldType.UINT16, 244, 0, 5),
|
||||
|
||||
// Raw sensors
|
||||
rawClt("raw CLT", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 238, 1.0 / PACK_MULT_VOLTAGE, 0, 5, "volts"),
|
||||
rawIat("raw IAT", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 240, 1.0 / PACK_MULT_VOLTAGE, 0, 5, "volts"),
|
||||
|
||||
// Synthetic (console only) channels
|
||||
ETB_CONTROL_QUALITY("ETB metric", SensorCategory.SNIFFING, "", 100),
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue