auto-sync
This commit is contained in:
parent
e33b4b5ad4
commit
1c51c09141
|
@ -306,7 +306,7 @@ void updateDevConsoleState(Engine *engine) {
|
|||
*/
|
||||
|
||||
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)));
|
||||
|
||||
|
@ -317,12 +317,12 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
|||
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engineConfiguration2));
|
||||
float injectorLag = getInjectorLag(engineConfiguration, getVBatt());
|
||||
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,
|
||||
injectorLag);
|
||||
|
||||
float value = getRunningFuel(baseFuel, &engine, (int) rpm);
|
||||
float value = getRunningFuel(baseFuelMs, &engine, (int) rpm);
|
||||
scheduleMsg(&logger2, "injection pulse width: %f", value);
|
||||
}
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
|
|||
float intake = getIntakeAirTemperature(engineConfiguration2);
|
||||
|
||||
float engineLoad = getEngineLoad();
|
||||
float baseFuel = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
||||
float baseFuelMs = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
|
||||
|
||||
tsOutputChannels->rpm = rpm;
|
||||
tsOutputChannels->coolant_temperature = coolant;
|
||||
|
@ -393,8 +393,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
|
|||
#endif
|
||||
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
|
||||
tsOutputChannels->sparkDwell = getSparkDwellMs(rpm);
|
||||
tsOutputChannels->pulseWidth = getRunningFuel(baseFuel, &engine, rpm);
|
||||
tsOutputChannels->crankingFuel = getCrankingFuel(&engine);
|
||||
tsOutputChannels->pulseWidthMs = getRunningFuel(baseFuelMs, &engine, rpm);
|
||||
tsOutputChannels->crankingFuelMs = getCrankingFuel(&engine);
|
||||
}
|
||||
|
||||
extern TunerStudioOutputChannels tsOutputChannels;
|
||||
|
|
|
@ -42,12 +42,12 @@ typedef struct {
|
|||
short int alignment; // size 2, offset 34
|
||||
float atmospherePressure; // size 4, offset 36
|
||||
float manifold_air_pressure; // size 4, offset 40
|
||||
float crankingFuel;
|
||||
int tpsVolrage;
|
||||
float crankingFuelMs;
|
||||
int unused;
|
||||
float tCharge; // 52
|
||||
float inj_adv; // 56
|
||||
float sparkDwell; // 60
|
||||
float pulseWidth; // 64
|
||||
float pulseWidthMs; // 64
|
||||
float warmUpEnrich; // 68
|
||||
/**
|
||||
* 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
|
||||
int tsConfigVersion;
|
||||
egt_values_s egtValues;
|
||||
int unused[3];
|
||||
int unused3[3];
|
||||
} TunerStudioOutputChannels;
|
||||
|
||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||
|
|
|
@ -85,8 +85,7 @@ float getFuelMs(int rpm, Engine *engine) {
|
|||
return theoreticalInjectionLength + injectorLag;
|
||||
}
|
||||
|
||||
// todo: start using 'engine' parameter and not 'extern'
|
||||
float getRunningFuel(float baseFuel, Engine *engine, int rpm) {
|
||||
float getRunningFuel(float baseFuelMs, Engine *engine, int rpm) {
|
||||
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
||||
float iatCorrection = getIatCorrection(engineConfiguration, getIntakeAirTemperature(engine->engineConfiguration2));
|
||||
float cltCorrection = getCltCorrection(engineConfiguration, getCoolantTemperature(engine->engineConfiguration2));
|
||||
|
@ -96,7 +95,7 @@ float getRunningFuel(float baseFuel, Engine *engine, int rpm) {
|
|||
// todo: accelEnrichment
|
||||
#endif /* EFI_ACCEL_ENRICHMENT */
|
||||
|
||||
return baseFuel * cltCorrection * iatCorrection;
|
||||
return baseFuelMs * cltCorrection * iatCorrection;
|
||||
}
|
||||
|
||||
static Map3D1616 fuelMap;
|
||||
|
|
|
@ -339,15 +339,17 @@ fileVersion = { 20141008 }
|
|||
#endif
|
||||
TPS = scalar, F32, 12, "%", 1, 0
|
||||
MAF = scalar, F32, 16, "V", 1, 0
|
||||
AFR = scalar, F32, 20, "AFR", 1, 0.0, 0.00, 25.5, 1 ;
|
||||
AFRactual = scalar, F32, 20, "AFR", 1, 0.0, 0.00, 25.5, 1 ;
|
||||
fuelload = scalar, F32, 24, "%", 1, 0.0 ; Blend of MAP and TPS, depends on algorithm
|
||||
VBatt = scalar, F32, 28, "V", 1, 0.0, 8, 21;
|
||||
; 10 bit TPS ADC value (from 0 to 1023 in 5v scale)
|
||||
tpsADC = scalar, U16, 32, "ADC", 1, 0.0;
|
||||
alignmet = scalar, U16, 34, "al", 1, 0.0;
|
||||
atmPres = scalar, F32, 36, "pres", 1, 0.0;
|
||||
MAP = scalar, F32, 40, "MAP", 1, 0.0;
|
||||
; total fuel squirt duration (in MS) per engine cycle according to current CLT
|
||||
crankingFuel = scalar, F32, 44, "ms", 1, 0.0;
|
||||
tpsAdcValue = scalar, U32, 48, "adc", 1, 0
|
||||
AFRextected = scalar, F32, 48, "adc", 1, 0
|
||||
tCharge = scalar, F32, 52, "T", 1, 0.0;
|
||||
inj_adv = scalar, F32, 56, "MAP", 1, 0.0;
|
||||
sparkDwell = scalar, F32, 60, "MAP", 1, 0.0;
|
||||
|
@ -472,7 +474,7 @@ fileVersion = { 20141008 }
|
|||
CLTGauge = coolant, "Coolant Temp", "°C", -40, 140, -15, 1, 95, 110, 1, 1
|
||||
IATGauge = intake, "Intake Air Temp", "°C", -40, 140, -15, 1, 95, 110, 1, 1
|
||||
throttleGauge = TPS, "Throttle Position", "%", 0, 100, 0, 0, 100, 100, 0, 0
|
||||
afr1Gauge = AFR, "Air:Fuel Ratio 1", "", 10, 19.4, 12, 13, 15, 16, 2, 2
|
||||
afr1Gauge = AFRactual, "Air:Fuel Ratio 1", "", 10, 19.4, 12, 13, 15, 16, 2, 2
|
||||
mafGauge = MAF, "Mass Air Flow", "v", 0, 5, 0, 1, 3, 4, 1, 1
|
||||
VBattGauge = VBatt, "Battery Voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1
|
||||
tpsADCGauge = tpsADC, "tps ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0
|
||||
|
@ -535,14 +537,13 @@ fileVersion = { 20141008 }
|
|||
entry = TPS, "TPS", float, "%d"
|
||||
entry = MAF, "MAF", float, "%.2f"
|
||||
entry = MAP, "MAP", float, "%d"
|
||||
entry = AFR, "AFR", float, "%.2f"
|
||||
entry = AFRactual, "AFR", float, "%.2f"
|
||||
entry = VBatt, "vBatt", float, "%.2f"
|
||||
entry = fuelload "Fuelload" float, "%d"
|
||||
; tpsADC = U16, "ADC",
|
||||
; alignmet = U16, "al",
|
||||
; atmPres = F32, "pres",
|
||||
; crankingFuel = F32, "ms",
|
||||
; tpsAdcValue = U32, "adc",
|
||||
; tCharge = F32, "T",
|
||||
; inj_adv = F32, "MAP",
|
||||
; sparkDwell = F32, "MAP",
|
||||
|
|
Loading…
Reference in New Issue