On m_event vs lobe vs scheduling #3804

This commit is contained in:
rusefillc 2022-01-18 20:57:06 -05:00
parent cb56681ac2
commit f470d93cca
3 changed files with 7 additions and 6 deletions

View File

@ -128,16 +128,17 @@ void HpfpController::onFastCallback() {
// Pressure current/target calculation
int rpm = engine->rpmCalculator.getRpm();
isHpfpActive = rpm < rpm_spinning_cutoff ||
isHpfpInactive = rpm < rpm_spinning_cutoff ||
engineConfiguration->hpfpCamLobes == 0 ||
engineConfiguration->hpfpPumpVolume == 0 ||
!enginePins.hpfpValve.isInitialized();
// What conditions can we not handle?
if (isHpfpActive) {
if (isHpfpInactive) {
m_quantity.reset();
m_requested_pump = 0;
m_deadtime = 0;
} else {
efiAssertVoid(OBD_PCM_Processor_Fault, "Too few trigger tooth for this number of HPFP lobes", engine->triggerCentral.triggerShape.getSize() > engineConfiguration->hpfpCamLobes * 6);
// Convert deadtime from ms to degrees based on current RPM
float deadtime_ms = interpolate2d(
Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE),

View File

@ -5,7 +5,7 @@ float fuel_requested_percent
float fuel_requested_percent_pi
bit noValve
bit angleAboveMin
bit isHpfpActive
bit isHpfpInactive
angle_t nextLobe
angle_t nextStart

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle\high_pressure_fuel_pump.txt Tue Jan 18 10:07:25 EST 2022
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle\high_pressure_fuel_pump.txt Tue Jan 18 20:53:30 EST 2022
// by class com.rusefi.output.CHeaderConsumer
// begin
#pragma once
@ -26,7 +26,7 @@ struct high_pressure_fuel_pump_s {
bool angleAboveMin : 1 {};
/**
offset 12 bit 2 */
bool isHpfpActive : 1 {};
bool isHpfpInactive : 1 {};
/**
offset 12 bit 3 */
bool unusedBit_6_3 : 1 {};
@ -126,4 +126,4 @@ struct high_pressure_fuel_pump_s {
};
// end
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle\high_pressure_fuel_pump.txt Tue Jan 18 10:07:25 EST 2022
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle\high_pressure_fuel_pump.txt Tue Jan 18 20:53:30 EST 2022