refactoring: less hacky implementation
This commit is contained in:
parent
bfabe25f2e
commit
aff7664c21
|
@ -94,7 +94,7 @@ public:
|
|||
AcState acState;
|
||||
bool enableOverdwellProtection = true;
|
||||
bool isPwmEnabled = true;
|
||||
int triggerActivitySecond = 0;
|
||||
int triggerActivitySecond = -99;
|
||||
|
||||
const char *prevOutputName = nullptr;
|
||||
|
||||
|
|
|
@ -720,7 +720,9 @@ void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
// see FUEL_PUMP_LOGIC
|
||||
if (isBrainPinValid(CONFIG(fuelPumpPin))) {
|
||||
enginePins.fuelPumpRelay.setValue((getTimeNowSeconds() < engine->triggerActivitySecond + engineConfiguration->startUpFuelPumpDuration) || (engine->rpmCalculator.getRpm() > 0));
|
||||
int triggerActivityOrEcuStartSecond = maxI(0, engine->triggerActivitySecond);
|
||||
|
||||
enginePins.fuelPumpRelay.setValue((getTimeNowSeconds() < triggerActivityOrEcuStartSecond + engineConfiguration->startUpFuelPumpDuration) || (engine->rpmCalculator.getRpm() > 0));
|
||||
}
|
||||
|
||||
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());
|
||||
|
|
Loading…
Reference in New Issue