parent
942f23a6b3
commit
c171d5f1d3
|
@ -10,7 +10,7 @@ struct AirmassResult {
|
|||
};
|
||||
|
||||
struct AirmassModelBase {
|
||||
virtual AirmassResult getAirmass(int rpm) const = 0;
|
||||
virtual AirmassResult getAirmass(int rpm) = 0;
|
||||
};
|
||||
|
||||
class AirmassVeModelBase : public AirmassModelBase {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "alphan_airmass.h"
|
||||
#include "sensor.h"
|
||||
|
||||
AirmassResult AlphaNAirmass::getAirmass(int rpm) const {
|
||||
AirmassResult AlphaNAirmass::getAirmass(int rpm) {
|
||||
auto tps = Sensor::get(SensorType::Tps1);
|
||||
|
||||
if (!tps.Valid) {
|
||||
|
|
|
@ -6,5 +6,5 @@ class AlphaNAirmass : public SpeedDensityBase {
|
|||
public:
|
||||
explicit AlphaNAirmass(const ValueProvider3D& veTable) : SpeedDensityBase(veTable) {}
|
||||
|
||||
AirmassResult getAirmass(int rpm) const override;
|
||||
AirmassResult getAirmass(int rpm) override;
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
AirmassResult MafAirmass::getAirmass(int rpm) const {
|
||||
AirmassResult MafAirmass::getAirmass(int rpm) {
|
||||
float maf = Sensor::get(SensorType::Maf).value_or(0) + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
return getAirmassImpl(maf, rpm);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class MafAirmass final : public AirmassVeModelBase {
|
|||
public:
|
||||
explicit MafAirmass(const ValueProvider3D& veTable) : AirmassVeModelBase(veTable) {}
|
||||
|
||||
AirmassResult getAirmass(int rpm) const override;
|
||||
AirmassResult getAirmass(int rpm) override;
|
||||
|
||||
// Compute airmass based on flow & engine speed
|
||||
AirmassResult getAirmassImpl(float massAirFlow, int rpm) const;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
AirmassResult SpeedDensityAirmass::getAirmass(int rpm) const {
|
||||
AirmassResult SpeedDensityAirmass::getAirmass(int rpm) {
|
||||
ScopePerf perf(PE::GetSpeedDensityFuel);
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@ public:
|
|||
, m_mapEstimationTable(&mapEstimationTable)
|
||||
{}
|
||||
|
||||
AirmassResult getAirmass(int rpm) const override;
|
||||
AirmassResult getAirmass(int rpm) override;
|
||||
|
||||
float getMap(int rpm) const;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
MockVp3d veTable;
|
||||
|
||||
MOCK_METHOD(AirmassResult, getAirmass, (int rpm), (const, override));
|
||||
MOCK_METHOD(AirmassResult, getAirmass, (int rpm), (override));
|
||||
};
|
||||
|
||||
class MockInjectorModel2 : public IInjectorModel {
|
||||
|
|
|
@ -115,7 +115,7 @@ TEST(AirmassModes, VeOverride) {
|
|||
struct DummyAirmassModel : public AirmassVeModelBase {
|
||||
DummyAirmassModel(const ValueProvider3D& veTable) : AirmassVeModelBase(veTable) {}
|
||||
|
||||
AirmassResult getAirmass(int rpm) const override {
|
||||
AirmassResult getAirmass(int rpm) override {
|
||||
// Default load value 10, will be overriden
|
||||
getVe(rpm, 10.0f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue