GDI: HPFP: more accurate logging

This commit is contained in:
Andrey Gusakov 2025-02-01 00:18:10 +03:00 committed by rusefillc
parent 8927cdf08e
commit a2f578f063
2 changed files with 4 additions and 4 deletions

View File

@ -193,7 +193,7 @@ void HpfpController::onFastCallback() {
void HpfpController::pinTurnOn(HpfpController *self) {
enginePins.hpfpValve.setHigh(HPFP_CONTROLLER);
self->HpfpValveState = true;
self->HpfdActivationAngle = getTriggerCentral()->currentEngineDecodedPhase;
self->HpfdActivationPhase = getTriggerCentral()->getCurrentEnginePhase(getTimeNowNt());
// By scheduling the close after we already open, we don't have to worry if the engine
// stops, the valve will be turned off in a certain amount of time regardless.
@ -207,7 +207,7 @@ void HpfpController::pinTurnOn(HpfpController *self) {
void HpfpController::pinTurnOff(HpfpController *self) {
enginePins.hpfpValve.setLow(HPFP_CONTROLLER);
self->HpfpValveState = false;
self->HpfdDeactivationAngle = getTriggerCentral()->currentEngineDecodedPhase;
self->HpfdDeactivationPhase = getTriggerCentral()->getCurrentEnginePhase(getTimeNowNt());
self->scheduleNextCycle();
}

View File

@ -10,7 +10,7 @@ bit HpfpValveState;GDI: HPFP Valve state
float m_pressureTarget_kPa;"GDI: target pressure"
angle_t nextLobe;"GDI: next lobe N"
float di_nextStart;GDI: valve activation angle;"v", 1, 0, 0, 100, 0
angle_t HpfdActivationAngle;"GDI: HPFP activation angle"
angle_t HpfdDeactivationAngle;"GDI: HPFP deactivation angle"
float HpfdActivationPhase;"GDI: HPFP activation angle"
float HpfdDeactivationPhase;"GDI: HPFP deactivation angle"
end_struct