On m_event vs lobe vs scheduling #3804
This commit is contained in:
parent
cb56681ac2
commit
f470d93cca
|
@ -128,16 +128,17 @@ void HpfpController::onFastCallback() {
|
||||||
// Pressure current/target calculation
|
// Pressure current/target calculation
|
||||||
int rpm = engine->rpmCalculator.getRpm();
|
int rpm = engine->rpmCalculator.getRpm();
|
||||||
|
|
||||||
isHpfpActive = rpm < rpm_spinning_cutoff ||
|
isHpfpInactive = rpm < rpm_spinning_cutoff ||
|
||||||
engineConfiguration->hpfpCamLobes == 0 ||
|
engineConfiguration->hpfpCamLobes == 0 ||
|
||||||
engineConfiguration->hpfpPumpVolume == 0 ||
|
engineConfiguration->hpfpPumpVolume == 0 ||
|
||||||
!enginePins.hpfpValve.isInitialized();
|
!enginePins.hpfpValve.isInitialized();
|
||||||
// What conditions can we not handle?
|
// What conditions can we not handle?
|
||||||
if (isHpfpActive) {
|
if (isHpfpInactive) {
|
||||||
m_quantity.reset();
|
m_quantity.reset();
|
||||||
m_requested_pump = 0;
|
m_requested_pump = 0;
|
||||||
m_deadtime = 0;
|
m_deadtime = 0;
|
||||||
} else {
|
} 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
|
// Convert deadtime from ms to degrees based on current RPM
|
||||||
float deadtime_ms = interpolate2d(
|
float deadtime_ms = interpolate2d(
|
||||||
Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE),
|
Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE),
|
||||||
|
|
|
@ -5,7 +5,7 @@ float fuel_requested_percent
|
||||||
float fuel_requested_percent_pi
|
float fuel_requested_percent_pi
|
||||||
bit noValve
|
bit noValve
|
||||||
bit angleAboveMin
|
bit angleAboveMin
|
||||||
bit isHpfpActive
|
bit isHpfpInactive
|
||||||
angle_t nextLobe
|
angle_t nextLobe
|
||||||
angle_t nextStart
|
angle_t nextStart
|
||||||
|
|
||||||
|
|
|
@ -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
|
// by class com.rusefi.output.CHeaderConsumer
|
||||||
// begin
|
// begin
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -26,7 +26,7 @@ struct high_pressure_fuel_pump_s {
|
||||||
bool angleAboveMin : 1 {};
|
bool angleAboveMin : 1 {};
|
||||||
/**
|
/**
|
||||||
offset 12 bit 2 */
|
offset 12 bit 2 */
|
||||||
bool isHpfpActive : 1 {};
|
bool isHpfpInactive : 1 {};
|
||||||
/**
|
/**
|
||||||
offset 12 bit 3 */
|
offset 12 bit 3 */
|
||||||
bool unusedBit_6_3 : 1 {};
|
bool unusedBit_6_3 : 1 {};
|
||||||
|
@ -126,4 +126,4 @@ struct high_pressure_fuel_pump_s {
|
||||||
};
|
};
|
||||||
|
|
||||||
// end
|
// 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
|
||||||
|
|
Loading…
Reference in New Issue