auto-sync

This commit is contained in:
rusEfi 2016-08-28 17:02:14 -04:00
parent ae3daee330
commit b944bbfcc6
4 changed files with 8 additions and 5 deletions

View File

@ -86,9 +86,11 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_S) {
return ENGINE(engineState.tpsAccelEnrich) + ENGINE(engineState.baseFuel);
}
float getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S) {
angle_t getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S) {
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
return fuelPhaseMap.getValue(rpm, engineLoad);
angle_t result = fuelPhaseMap.getValue(rpm, engineLoad) + CONFIG(extraInjectionOffset);
fixAngle(result);
return result;
}
/**

View File

@ -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);
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_S);
float getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S);
angle_t 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);

View File

@ -147,6 +147,7 @@ void FuelSchedule::registerInjectionEvent(int injectorIndex, float angle,
// error already reported
return;
}
//ev->
ev->injectorIndex = injectorIndex;
ev->output = output;
@ -197,7 +198,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
* engineState.injectionOffset is calculated from the same utility timer should we more that logic here?
*/
angle_t baseAngle = ENGINE(engineState.injectionOffset)
+ CONFIG(extraInjectionOffset) - MS2US(ENGINE(fuelMs)) / ENGINE(rpmCalculator.oneDegreeUs);
- MS2US(ENGINE(fuelMs)) / ENGINE(rpmCalculator.oneDegreeUs);
switch (mode) {
case IM_SEQUENTIAL:

View File

@ -76,7 +76,7 @@ public class FormulasPane {
if (ci == null)
return;
int algorithm = ConfigField.getIntValue(ci, Fields.ALGORITHM);
int algorithm = ConfigField.getIntValue(ci, Fields.FUELALGORITHM);
engine_load_mode_e[] values = engine_load_mode_e.values();
if (algorithm >= values.length)
throw new IllegalStateException("Unexpected "+ algorithm);