mirror of https://github.com/rusefi/rusefi.git
auto-sync
This commit is contained in:
parent
850f72530c
commit
3d1c58a849
|
@ -306,7 +306,7 @@ void updateDevConsoleState(Engine *engine) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void showFuelInfo2(float rpm, float engineLoad) {
|
static void showFuelInfo2(float rpm, float engineLoad) {
|
||||||
float baseFuel = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
float baseFuelMs = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
||||||
|
|
||||||
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->algorithm), boolToString(getOutputPinValue(FUEL_PUMP_RELAY)));
|
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->algorithm), boolToString(getOutputPinValue(FUEL_PUMP_RELAY)));
|
||||||
|
|
||||||
|
@ -317,12 +317,12 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
||||||
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engineConfiguration2));
|
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engineConfiguration2));
|
||||||
float injectorLag = getInjectorLag(engineConfiguration, getVBatt());
|
float injectorLag = getInjectorLag(engineConfiguration, getVBatt());
|
||||||
scheduleMsg(&logger2, "rpm=%f engineLoad=%f", rpm, engineLoad);
|
scheduleMsg(&logger2, "rpm=%f engineLoad=%f", rpm, engineLoad);
|
||||||
scheduleMsg(&logger2, "baseFuel=%f", baseFuel);
|
scheduleMsg(&logger2, "baseFuel=%f", baseFuelMs);
|
||||||
|
|
||||||
scheduleMsg(&logger2, "iatCorrection=%f cltCorrection=%f injectorLag=%f", iatCorrection, cltCorrection,
|
scheduleMsg(&logger2, "iatCorrection=%f cltCorrection=%f injectorLag=%f", iatCorrection, cltCorrection,
|
||||||
injectorLag);
|
injectorLag);
|
||||||
|
|
||||||
float value = getRunningFuel(baseFuel, &engine, (int) rpm);
|
float value = getRunningFuel(baseFuelMs, &engine, (int) rpm);
|
||||||
scheduleMsg(&logger2, "injection pulse width: %f", value);
|
scheduleMsg(&logger2, "injection pulse width: %f", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||||
float intake = getIntakeAirTemperature(engineConfiguration2);
|
float intake = getIntakeAirTemperature(engineConfiguration2);
|
||||||
|
|
||||||
float engineLoad = getEngineLoad();
|
float engineLoad = getEngineLoad();
|
||||||
float baseFuel = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
float baseFuelMs = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
||||||
|
|
||||||
tsOutputChannels->rpm = rpm;
|
tsOutputChannels->rpm = rpm;
|
||||||
tsOutputChannels->coolant_temperature = coolant;
|
tsOutputChannels->coolant_temperature = coolant;
|
||||||
|
@ -393,8 +393,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||||
#endif
|
#endif
|
||||||
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
|
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
|
||||||
tsOutputChannels->sparkDwell = getSparkDwellMs(rpm);
|
tsOutputChannels->sparkDwell = getSparkDwellMs(rpm);
|
||||||
tsOutputChannels->pulseWidth = getRunningFuel(baseFuel, &engine, rpm);
|
tsOutputChannels->pulseWidthMs = getRunningFuel(baseFuelMs, &engine, rpm);
|
||||||
tsOutputChannels->crankingFuel = getCrankingFuel(&engine);
|
tsOutputChannels->crankingFuelMs = getCrankingFuel(&engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
|
|
|
@ -42,12 +42,12 @@ typedef struct {
|
||||||
short int alignment; // size 2, offset 34
|
short int alignment; // size 2, offset 34
|
||||||
float atmospherePressure; // size 4, offset 36
|
float atmospherePressure; // size 4, offset 36
|
||||||
float manifold_air_pressure; // size 4, offset 40
|
float manifold_air_pressure; // size 4, offset 40
|
||||||
float crankingFuel;
|
float crankingFuelMs;
|
||||||
int tpsVolrage;
|
int unused;
|
||||||
float tCharge; // 52
|
float tCharge; // 52
|
||||||
float inj_adv; // 56
|
float inj_adv; // 56
|
||||||
float sparkDwell; // 60
|
float sparkDwell; // 60
|
||||||
float pulseWidth; // 64
|
float pulseWidthMs; // 64
|
||||||
float warmUpEnrich; // 68
|
float warmUpEnrich; // 68
|
||||||
/**
|
/**
|
||||||
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
|
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
|
||||||
|
@ -71,7 +71,7 @@ typedef struct {
|
||||||
unsigned int isIatError : 1; // bit 3
|
unsigned int isIatError : 1; // bit 3
|
||||||
int tsConfigVersion;
|
int tsConfigVersion;
|
||||||
egt_values_s egtValues;
|
egt_values_s egtValues;
|
||||||
int unused[3];
|
int unused3[3];
|
||||||
} TunerStudioOutputChannels;
|
} TunerStudioOutputChannels;
|
||||||
|
|
||||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||||
|
|
|
@ -85,8 +85,7 @@ float getFuelMs(int rpm, Engine *engine) {
|
||||||
return theoreticalInjectionLength + injectorLag;
|
return theoreticalInjectionLength + injectorLag;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: start using 'engine' parameter and not 'extern'
|
float getRunningFuel(float baseFuelMs, Engine *engine, int rpm) {
|
||||||
float getRunningFuel(float baseFuel, Engine *engine, int rpm) {
|
|
||||||
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
||||||
float iatCorrection = getIatCorrection(engineConfiguration, getIntakeAirTemperature(engine->engineConfiguration2));
|
float iatCorrection = getIatCorrection(engineConfiguration, getIntakeAirTemperature(engine->engineConfiguration2));
|
||||||
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engine->engineConfiguration2));
|
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engine->engineConfiguration2));
|
||||||
|
@ -96,7 +95,7 @@ float getRunningFuel(float baseFuel, Engine *engine, int rpm) {
|
||||||
// todo: accelEnrichment
|
// todo: accelEnrichment
|
||||||
#endif /* EFI_ACCEL_ENRICHMENT */
|
#endif /* EFI_ACCEL_ENRICHMENT */
|
||||||
|
|
||||||
return baseFuel * cltCorrection * iatCorrection;
|
return baseFuelMs * cltCorrection * iatCorrection;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map3D1616 fuelMap;
|
static Map3D1616 fuelMap;
|
||||||
|
|
Loading…
Reference in New Issue