| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 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 | ||||
| 11 | 1090 | void FuelPumpController::onSlowCallback() { | ||
| 12 | 1090 | auto timeSinceIgn = m_ignOnTimer.getElapsedSeconds(); | ||
| 13 | ||||
| 14 | // If the ignition just turned on, turn on the fuel pump to prime | |||
| 15 |
3/4✓ Branch 0 taken 1090 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 87 times.
✓ Branch 3 taken 1003 times.
|
1090 | 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! | |||
| 19 | 1090 | engineTurnedRecently = engine->triggerCentral.engineMovedRecently(); | ||
| 20 | #endif //EFI_SHAFT_POSITION_INPUT | |||
| 21 | ||||
| 22 |
4/4✓ Branch 0 taken 1003 times.
✓ Branch 1 taken 87 times.
✓ Branch 2 taken 1 time.
✓ Branch 3 taken 1002 times.
|
1090 | isFuelPumpOn = isPrime || engineTurnedRecently; | |
| 23 | ||||
| 24 |
1/2✓ Branch 1 taken 1090 times.
✗ Branch 2 not taken.
|
1/2✓ Decision 'true' taken 1090 times.
✗ Decision 'false' not taken.
|
1090 | if (!isRunningBenchTest()) { |
| 25 | 1090 | enginePins.fuelPumpRelay.setValue("FP", isFuelPumpOn); | ||
| 26 | } | |||
| 27 | 1090 | } | ||
| 28 | ||||
| 29 | 5 | void FuelPumpController::onIgnitionStateChanged(bool ignitionOnParam) { | ||
| 30 | // live data parser convention is asking for a field | |||
| 31 | 5 | ignitionOn = ignitionOnParam; | ||
| 32 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
1/2✓ Decision 'true' taken 5 times.
✗ Decision 'false' not taken.
|
5 | if (ignitionOn) { |
| 33 | 5 | m_ignOnTimer.reset(); | ||
| 34 | } | |||
| 35 | 5 | } | ||
| 36 |