updating EFI_VEHICLE_SPEED guard

This commit is contained in:
rusefillc 2024-01-07 18:02:18 -05:00
parent b551263827
commit 0356485274
1 changed files with 1 additions and 1 deletions

View File

@ -88,6 +88,7 @@ void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase
} }
#endif /*EFI_PRINTF_FUEL_DETAILS */ #endif /*EFI_PRINTF_FUEL_DETAILS */
#if EFI_VEHICLE_SPEED
bool isCranking = getEngineRotationState()->isCranking(); bool isCranking = getEngineRotationState()->isCranking();
/** /**
* todo: pre-calculate 'numberOfInjections' * todo: pre-calculate 'numberOfInjections'
@ -95,7 +96,6 @@ void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase
*/ */
int numberOfInjections = isCranking ? getNumberOfInjections(engineConfiguration->crankingInjectionMode) : getNumberOfInjections(engineConfiguration->injectionMode); int numberOfInjections = isCranking ? getNumberOfInjections(engineConfiguration->crankingInjectionMode) : getNumberOfInjections(engineConfiguration->injectionMode);
#if EFI_VEHICLE_SPEED
engine->module<TripOdometer>()->consumeFuel(injectionMassGrams * numberOfInjections, nowNt); engine->module<TripOdometer>()->consumeFuel(injectionMassGrams * numberOfInjections, nowNt);
#endif // EFI_VEHICLE_SPEED #endif // EFI_VEHICLE_SPEED