hardware CI for clt/iat inputs (#2401)

* test raw CLT/IAT

* dot zero
This commit is contained in:
Matthew Kennedy 2021-02-25 12:09:16 -10:00 committed by GitHub
parent 39d9f55d01
commit ebb6f3033a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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),
;