diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 5b4365850b..7ef4e9bd10 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -86,7 +86,7 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_S) { return ENGINE(engineState.tpsAccelEnrich) + ENGINE(engineState.baseFuel); } -float getinjectionOffset(int rpm DECLARE_ENGINE_PARAMETER_S) { +float getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S) { float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F); return fuelPhaseMap.getValue(rpm, engineLoad); } diff --git a/firmware/controllers/algo/fuel_math.h b/firmware/controllers/algo/fuel_math.h index fafe0d496d..ff51bbd39b 100644 --- a/firmware/controllers/algo/fuel_math.h +++ b/firmware/controllers/algo/fuel_math.h @@ -27,7 +27,7 @@ floatms_t getRealMafFuel(float airMass, int rpm DECLARE_ENGINE_PARAMETER_S); floatms_t getBaseTableFuel(engine_configuration_s *engineConfiguration, int rpm, float engineLoad); float getBaroCorrection(DECLARE_ENGINE_PARAMETER_F); -float getinjectionOffset(int rpm DECLARE_ENGINE_PARAMETER_S); +float getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S); float getIatCorrection(float iat DECLARE_ENGINE_PARAMETER_S); floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_S); float getCltCorrection(float clt DECLARE_ENGINE_PARAMETER_S); diff --git a/firmware/controllers/core/table_helper.cpp b/firmware/controllers/core/table_helper.cpp index 955a0954fc..acf6bc70ad 100644 --- a/firmware/controllers/core/table_helper.cpp +++ b/firmware/controllers/core/table_helper.cpp @@ -22,7 +22,7 @@ void setTableBin2(float array[], int size, float l, float r, float precision) { void setRpmBin(float array[], int size, float idleRpm, float topRpm) { array[0] = idleRpm - 150; - int rpmStep = efiRound((topRpm - idleRpm) / (size - 2), 50) - 150; + int rpmStep = (int)(efiRound((topRpm - idleRpm) / (size - 2), 50) - 150); for (int i = 1; i < size - 1;i++) array[i] = idleRpm + rpmStep * (i - 1); array[size - 1] = topRpm;