rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
fuel_pump.cpp
Go to the documentation of this file.
1/**
2 * low pressure fuel pump control
3 * for high-pressure see HpfpController@high_pressure_fuel_pump
4 *
5*/
6#include "pch.h"
7
8#include "fuel_pump.h"
9#include "bench_test.h"
10
12 auto timeSinceIgn = m_ignOnTimer.getElapsedSeconds();
13
14 // If the ignition just turned on, turn on the fuel pump to prime
15 isPrime = timeSinceIgn >= 0 && timeSinceIgn < engineConfiguration->startUpFuelPumpDuration;
16
17#if EFI_SHAFT_POSITION_INPUT
18 // If there was a trigger event recently, turn on the pump, the engine is running!
20#endif //EFI_SHAFT_POSITION_INPUT
21
23
24 if (!isRunningBenchTest()) {
26 }
27}
28
30 // live data parser convention is asking for a field
31 ignitionOn = ignitionOnParam;
32 if (ignitionOn) {
33 m_ignOnTimer.reset();
34 }
35}
bool isRunningBenchTest()
Utility methods related to bench testing.
TriggerCentral triggerCentral
Definition engine.h:318
RegisteredOutputPin fuelPumpRelay
Definition efi_gpio.h:91
void onIgnitionStateChanged(bool ignitionOn) override
Definition fuel_pump.cpp:29
void onSlowCallback() override
Definition fuel_pump.cpp:11
void setValue(const char *msg, int logicValue, bool isForce=false)
Definition efi_gpio.cpp:604
bool engineMovedRecently(efitick_t nowNt) const
EnginePins enginePins
Definition efi_gpio.cpp:24
static EngineAccessor engine
Definition engine.h:413
static constexpr engine_configuration_s * engineConfiguration