better EFI_ENGINE_CONTROL guard
This commit is contained in:
parent
bb161be8e8
commit
6de42dbab6
|
@ -31,6 +31,8 @@
|
|||
// todo: reset this between cranking attempts?! #2735
|
||||
int minCrankingRpm = 0;
|
||||
|
||||
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
|
||||
|
||||
/**
|
||||
* @return ignition timing angle advance before TDC
|
||||
*/
|
||||
|
@ -107,7 +109,6 @@ static angle_t getRunningAdvance(int rpm, float engineLoad) {
|
|||
return advanceAngle;
|
||||
}
|
||||
|
||||
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
|
||||
static angle_t getAdvanceCorrections(float engineLoad) {
|
||||
auto iat = Sensor::get(SensorType::Iat);
|
||||
|
||||
|
|
|
@ -168,6 +168,8 @@ float getMaxAirflowAtMap(float map) {
|
|||
return sdAirmass.getAirflow(Sensor::getOrZero(SensorType::Rpm), map, false);
|
||||
}
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
|
||||
// Per-cylinder base fuel mass
|
||||
static float getBaseFuelMass(int rpm) {
|
||||
ScopePerf perf(PE::GetBaseFuel);
|
||||
|
@ -297,7 +299,6 @@ static float getCycleFuelMass(bool isCranking, float baseFuelMass) {
|
|||
float getInjectionMass(int rpm) {
|
||||
ScopePerf perf(PE::GetInjectionDuration);
|
||||
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
// Always update base fuel - some cranking modes use it
|
||||
float baseFuelMass = getBaseFuelMass(rpm);
|
||||
|
||||
|
@ -326,10 +327,8 @@ float getInjectionMass(int rpm) {
|
|||
float tpsFuelMass = engine->module<InjectorModel>()->getFuelMassForDuration(tpsAccelPerInjection);
|
||||
|
||||
return injectionFuelMass + tpsFuelMass;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialize fuel map data structure
|
||||
|
|
Loading…
Reference in New Issue