migrating to SensorType::Rpm API
This commit is contained in:
parent
5ea408c033
commit
e945bc4bc9
|
@ -292,7 +292,7 @@ float IdleController::getIdlePosition() {
|
|||
if (useInstantRpmForIdle) {
|
||||
rpm = engine->triggerCentral.triggerState.getInstantRpm();
|
||||
} else {
|
||||
rpm = GET_RPM();
|
||||
rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
}
|
||||
|
||||
// Compute the target we're shooting for
|
||||
|
|
|
@ -370,7 +370,7 @@ TEST(idle_v2, IntegrationManual) {
|
|||
Sensor::setMockValue(SensorType::DriverThrottleIntent, expectedTps.Value);
|
||||
Sensor::setMockValue(SensorType::Clt, expectedClt);
|
||||
Sensor::setMockValue(SensorType::VehicleSpeed, 15.0);
|
||||
engine->rpmCalculator.mockRpm = 950;
|
||||
Sensor::setMockValue(SensorType::Rpm, 950);
|
||||
|
||||
// Target of 1000 rpm
|
||||
EXPECT_CALL(dut, getTargetRpm(expectedClt))
|
||||
|
@ -404,7 +404,7 @@ TEST(idle_v2, IntegrationAutomatic) {
|
|||
Sensor::setMockValue(SensorType::DriverThrottleIntent, expectedTps.Value);
|
||||
Sensor::setMockValue(SensorType::Clt, expectedClt);
|
||||
Sensor::setMockValue(SensorType::VehicleSpeed, 15.0);
|
||||
engine->rpmCalculator.mockRpm = 950;
|
||||
Sensor::setMockValue(SensorType::Rpm, 950);
|
||||
|
||||
// Target of 1000 rpm
|
||||
EXPECT_CALL(dut, getTargetRpm(expectedClt))
|
||||
|
@ -441,7 +441,7 @@ TEST(idle_v2, IntegrationClamping) {
|
|||
Sensor::setMockValue(SensorType::DriverThrottleIntent, expectedTps.Value);
|
||||
Sensor::setMockValue(SensorType::Clt, expectedClt);
|
||||
Sensor::setMockValue(SensorType::VehicleSpeed, 15.0);
|
||||
engine->rpmCalculator.mockRpm = 950;
|
||||
Sensor::setMockValue(SensorType::Rpm, 950);
|
||||
|
||||
// Target of 1000 rpm
|
||||
EXPECT_CALL(dut, getTargetRpm(expectedClt))
|
||||
|
|
Loading…
Reference in New Issue