Fix the types in various fuel functions that actually refer to grams, not ms. (#3458)

This commit is contained in:
racer-coder 2021-11-04 08:50:19 -07:00 committed by GitHub
parent 6462db9aed
commit 2612db570f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -92,7 +92,7 @@ float getCrankingFuel3(
return crankingFuel;
}
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) {
float getRunningFuel(float baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) {
ScopePerf perf(PE::GetRunningFuel);
ENGINE(engineState.running.baseFuel) = baseFuel;
@ -109,7 +109,7 @@ floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) {
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(cltCorrection), "NaN cltCorrection", 0);
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(postCrankingFuelCorrection), "NaN postCrankingFuelCorrection", 0);
floatms_t runningFuel = baseFuel * baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
float runningFuel = baseFuel * baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
ENGINE(engineState.running.fuel) = runningFuel * 1000;
@ -258,10 +258,10 @@ static float getCycleFuelMass(bool isCranking, float baseFuelMass DECLARE_ENGINE
}
/**
* @returns Length of each individual fuel injection, in milliseconds
* @returns Mass of each individual fuel injection, in grams
* in case of single point injection mode the amount of fuel into all cylinders, otherwise the amount for one cylinder
*/
floatms_t getInjectionMass(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
float getInjectionMass(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
ScopePerf perf(PE::GetInjectionDuration);
#if EFI_SHAFT_POSITION_INPUT

View File

@ -15,7 +15,7 @@ void initFuelMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
/**
* @return baseFuel with CLT and IAT corrections
*/
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
float getRunningFuel(float baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
@ -27,7 +27,7 @@ float getFuelCutOffCorrection(efitick_t nowNt, int rpm DECLARE_ENGINE_PARAMETER_
angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
float getCrankingFuel(float baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCrankingFuel3(float baseFuel, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_SUFFIX);
floatms_t getInjectionMass(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
float getInjectionMass(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
float getStandardAirCharge(DECLARE_ENGINE_PARAMETER_SIGNATURE);