auto-sync
This commit is contained in:
parent
e0530f9c64
commit
65d8321ccf
|
@ -52,7 +52,7 @@ typedef struct {
|
||||||
* this one contains total resulting fuel squirt time, per event
|
* this one contains total resulting fuel squirt time, per event
|
||||||
* With all corrections. See also baseFuel
|
* With all corrections. See also baseFuel
|
||||||
*/
|
*/
|
||||||
float pulseWidthMs; // 64
|
float actualLastInjection; // 64
|
||||||
float debugFloatField1; // 68
|
float debugFloatField1; // 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
|
||||||
|
|
|
@ -622,6 +622,9 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER);
|
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER);
|
||||||
tsOutputChannels->runningFuel = ENGINE(engineState.runningFuel);
|
tsOutputChannels->runningFuel = ENGINE(engineState.runningFuel);
|
||||||
tsOutputChannels->injectorLagMs = ENGINE(engineState.injectorLag);
|
tsOutputChannels->injectorLagMs = ENGINE(engineState.injectorLag);
|
||||||
|
tsOutputChannels->baseFuel = engine->engineState.baseFuel;
|
||||||
|
tsOutputChannels->actualLastInjection = ENGINE(actualLastInjection);
|
||||||
|
|
||||||
tsOutputChannels->timeSeconds = getTimeNowSeconds();
|
tsOutputChannels->timeSeconds = getTimeNowSeconds();
|
||||||
|
|
||||||
if (engineConfiguration->debugMode == DBG_TPS_ACCEL) {
|
if (engineConfiguration->debugMode == DBG_TPS_ACCEL) {
|
||||||
|
@ -694,8 +697,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
float timing = engine->engineState.timingAdvance;
|
float timing = engine->engineState.timingAdvance;
|
||||||
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
|
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
|
||||||
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);
|
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);
|
||||||
tsOutputChannels->baseFuel = engine->engineState.baseFuel;
|
|
||||||
tsOutputChannels->pulseWidthMs = ENGINE(actualLastInjection);
|
|
||||||
tsOutputChannels->crankingFuelMs = getCrankingFuel(PASS_ENGINE_PARAMETER_F);
|
tsOutputChannels->crankingFuelMs = getCrankingFuel(PASS_ENGINE_PARAMETER_F);
|
||||||
tsOutputChannels->chargeAirMass = engine->engineState.airMass;
|
tsOutputChannels->chargeAirMass = engine->engineState.airMass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,11 @@ public:
|
||||||
floatms_t baseFuel;
|
floatms_t baseFuel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fuel with CLT, IAT and TPS acceleration corrections, as squirt duration.
|
* Total fuel with CLT, IAT and TPS acceleration corrections per cycle,
|
||||||
|
* as squirt duration.
|
||||||
|
* Without injector lag.
|
||||||
|
* @see baseFule
|
||||||
|
* @see actualLastInjection
|
||||||
*/
|
*/
|
||||||
floatms_t runningFuel;
|
floatms_t runningFuel;
|
||||||
|
|
||||||
|
|
|
@ -323,9 +323,9 @@ public class BinaryProtocol {
|
||||||
|
|
||||||
offset += requestSize;
|
offset += requestSize;
|
||||||
}
|
}
|
||||||
|
setController(image);
|
||||||
logger.info("Got configuration from controller.");
|
logger.info("Got configuration from controller.");
|
||||||
ConnectionStatus.INSTANCE.setValue(ConnectionStatus.Value.CONNECTED);
|
ConnectionStatus.INSTANCE.setValue(ConnectionStatus.Value.CONNECTED);
|
||||||
setController(image);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -92,6 +92,7 @@ public enum Sensor {
|
||||||
FUEL_BASE(SensorCategory.FUEL, FieldType.FLOAT, 48, BackgroundColor.MUD, 0, 30, "ms"),
|
FUEL_BASE(SensorCategory.FUEL, FieldType.FLOAT, 48, BackgroundColor.MUD, 0, 30, "ms"),
|
||||||
T_CHARGE(SensorCategory.FUEL, FieldType.FLOAT, 52, BackgroundColor.MUD, 30, 140),
|
T_CHARGE(SensorCategory.FUEL, FieldType.FLOAT, 52, BackgroundColor.MUD, 30, 140),
|
||||||
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
||||||
|
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
||||||
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
||||||
|
|
||||||
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
||||||
|
|
|
@ -181,16 +181,15 @@ public class FormulasPane {
|
||||||
String CLTcorr = oneDecimal(Sensor.cltCorrection);
|
String CLTcorr = oneDecimal(Sensor.cltCorrection);
|
||||||
String tpsAccel = oneDecimal(Sensor.tpsAccelFuel);
|
String tpsAccel = oneDecimal(Sensor.tpsAccelFuel);
|
||||||
|
|
||||||
String runningFuel = oneDecimal(Sensor.runningFuel);
|
|
||||||
|
|
||||||
String tempCorrections = " * cltCorr(" + CLTcorr + ") * iatCorr(" + IATcorr + ")";
|
String tempCorrections = " * cltCorr(" + CLTcorr + ") * iatCorr(" + IATcorr + ")";
|
||||||
|
|
||||||
String injectorLag = "+ ( injectorLag(VBatt = " + vBatt + ") = " + oneDecimal(Sensor.injectorLagMs) + ")";
|
String injectorLag = "+ ( injectorLag(VBatt = " + vBatt + ") = " + oneDecimal(Sensor.injectorLagMs) + ")";
|
||||||
|
|
||||||
|
String actualLastInjection = oneDecimal(Sensor.actualLastInjection);
|
||||||
String injTime = "$Fuel (ms) = " +
|
String injTime = "$Fuel (ms) = " +
|
||||||
"(Base_Fuel (" + baseFuelStr + "ms) + Tps_Accel_Corr = (" + tpsAccel + "ms))" +
|
"(Base_Fuel (" + baseFuelStr + "ms) + Tps_Accel_Corr = (" + tpsAccel + "ms))" +
|
||||||
tempCorrections + injectorLag +
|
tempCorrections + injectorLag +
|
||||||
" = " + runningFuel + "ms$";
|
" = " + actualLastInjection + "ms_per_injection$";
|
||||||
|
|
||||||
return acceleration +
|
return acceleration +
|
||||||
tCharge + newLine +
|
tCharge + newLine +
|
||||||
|
|
|
@ -33,6 +33,7 @@ public abstract class BaseConfigField {
|
||||||
ConnectionStatus.INSTANCE.addListener(new ConnectionStatus.Listener() {
|
ConnectionStatus.INSTANCE.addListener(new ConnectionStatus.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConnectionStatus(boolean isConnected) {
|
public void onConnectionStatus(boolean isConnected) {
|
||||||
|
if (ConnectionStatus.INSTANCE.getValue() == ConnectionStatus.Value.CONNECTED)
|
||||||
processInitialValue(field);
|
processInitialValue(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue