migrating to SensorType::Rpm API
This commit is contained in:
parent
c17592bfe2
commit
c7a62bcdb3
|
@ -126,7 +126,7 @@ angle_t HpfpQuantity::pumpAngleFuel(int rpm, HpfpController *model) {
|
|||
|
||||
void HpfpController::onFastCallback() {
|
||||
// Pressure current/target calculation
|
||||
int rpm = engine->rpmCalculator.getRpm();
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
|
||||
isHpfpInactive = rpm < rpm_spinning_cutoff ||
|
||||
engineConfiguration->hpfpCamLobes == 0 ||
|
||||
|
|
|
@ -352,7 +352,7 @@ TEST(misc, testRpmCalculator) {
|
|||
assertEqualsM("injection angle", 31.365, ie0->injectionStart.angleOffsetFromTriggerEvent);
|
||||
|
||||
eth.firePrimaryTriggerRise();
|
||||
ASSERT_EQ(1500, eth.engine.rpmCalculator.getRpm());
|
||||
ASSERT_EQ(1500, Sensor::getOrZero(SensorType::Rpm));
|
||||
|
||||
assertEqualsM("dwell", 4.5, engine->engineState.dwellAngle);
|
||||
assertEqualsM("fuel #2", 4.5450, engine->injectionDuration);
|
||||
|
@ -406,7 +406,7 @@ TEST(misc, testRpmCalculator) {
|
|||
|
||||
assertEqualsM("dwell", 4.5, eth.engine.engineState.dwellAngle);
|
||||
assertEqualsM("fuel #3", 4.5450, eth.engine.injectionDuration);
|
||||
ASSERT_EQ(1500, eth.engine.rpmCalculator.getRpm());
|
||||
ASSERT_EQ(1500, Sensor::getOrZero(SensorType::Rpm));
|
||||
|
||||
eth.assertInjectorUpEvent("ev 0/2", 0, -4849, 2);
|
||||
|
||||
|
@ -1240,7 +1240,7 @@ TEST(big, testMissedSpark299) {
|
|||
|
||||
printf("*************************************************** testMissedSpark299 start\r\n");
|
||||
|
||||
ASSERT_EQ(3000, eth.engine.rpmCalculator.getRpm());
|
||||
ASSERT_EQ(3000, Sensor::getOrZero(SensorType::Rpm));
|
||||
|
||||
setWholeTimingTable(3);
|
||||
eth.engine.periodicFastCallback();
|
||||
|
|
Loading…
Reference in New Issue