parent
cce7991e37
commit
13d4475986
|
@ -585,7 +585,7 @@ bool validateConfig() {
|
|||
ensureArrayIsAscending("Pedal map pedal", config->pedalToTpsPedalBins);
|
||||
ensureArrayIsAscending("Pedal map RPM", config->pedalToTpsRpmBins);
|
||||
|
||||
if (engineConfiguration->hpfpCamLobes > 0) {
|
||||
if (isGdiEngine()) {
|
||||
ensureArrayIsAscending("HPFP compensation", engineConfiguration->hpfpCompensationRpmBins);
|
||||
ensureArrayIsAscending("HPFP deadtime", engineConfiguration->hpfpDeadtimeVoltsBins);
|
||||
ensureArrayIsAscending("HPFP lobe profile", engineConfiguration->hpfpLobeProfileQuantityBins);
|
||||
|
|
|
@ -150,12 +150,16 @@ angle_t HpfpQuantity::pumpAngleFuel(int rpm, HpfpController *model) {
|
|||
engineConfiguration->hpfpLobeProfileAngle);
|
||||
}
|
||||
|
||||
bool isGdiEngine() {
|
||||
return engineConfiguration->hpfpCamLobes > 0;
|
||||
}
|
||||
|
||||
void HpfpController::onFastCallback() {
|
||||
// Pressure current/target calculation
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
|
||||
isHpfpInactive = rpm < rpm_spinning_cutoff ||
|
||||
engineConfiguration->hpfpCamLobes == 0 ||
|
||||
!isGdiEngine() ||
|
||||
engineConfiguration->hpfpPumpVolume == 0 ||
|
||||
!enginePins.hpfpValve.isInitialized();
|
||||
// What conditions can we not handle?
|
||||
|
|
|
@ -31,6 +31,8 @@ public:
|
|||
angle_t findNextLobe(); ///< Calculate the angle (after crank TDC) for the top of the next lobe
|
||||
};
|
||||
|
||||
bool isGdiEngine();
|
||||
|
||||
class HpfpController;
|
||||
|
||||
class HpfpQuantity {
|
||||
|
|
Loading…
Reference in New Issue