mirror of https://github.com/FOME-Tech/fome-fw.git
auto-sync
This commit is contained in:
parent
1bcdc21269
commit
c895038430
|
@ -38,7 +38,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see EngineSnifferPanel
|
* @see EngineSnifferPanel
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20161002;
|
public static final int CONSOLE_VERSION = 20161009;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
private static final String TAB_INDEX = "main_tab";
|
private static final String TAB_INDEX = "main_tab";
|
||||||
protected static final String PORT_KEY = "port";
|
protected static final String PORT_KEY = "port";
|
||||||
|
|
|
@ -103,13 +103,13 @@ public class FormulasPane {
|
||||||
double rpm = SensorCentral.getInstance().getValue(Sensor.RPM);
|
double rpm = SensorCentral.getInstance().getValue(Sensor.RPM);
|
||||||
double maf = SensorCentral.getInstance().getValue(Sensor.MAF);
|
double maf = SensorCentral.getInstance().getValue(Sensor.MAF);
|
||||||
|
|
||||||
String baseFuelStr = oneDecimal(Sensor.FUEL_BASE);
|
String baseFuelStr = twoDecimals(Sensor.FUEL_BASE);
|
||||||
String baseFuel = "$Base_Fuel (ms) = lookup (" +
|
String baseFuel = "$Base_Fuel (ms) = lookup (" +
|
||||||
"(RPM = " + rpm + ", " +
|
"(RPM = " + rpm + ", " +
|
||||||
"MAF = " + maf + ") = " +
|
"MAF = " + maf + ") = " +
|
||||||
baseFuelStr + "ms";
|
baseFuelStr + "ms";
|
||||||
|
|
||||||
String actualLastInjection = oneDecimal(Sensor.actualLastInjection);
|
String actualLastInjection = twoDecimals(Sensor.actualLastInjection);
|
||||||
String injTime = "$Fuel (ms) = " + baseFuel + getInjecctorLag() +
|
String injTime = "$Fuel (ms) = " + baseFuel + getInjecctorLag() +
|
||||||
" = " + actualLastInjection + "ms_per_injection$";
|
" = " + actualLastInjection + "ms_per_injection$";
|
||||||
|
|
||||||
|
@ -134,8 +134,8 @@ public class FormulasPane {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getAccelerationVariables(ConfigurationImage ci) {
|
private String getAccelerationVariables(ConfigurationImage ci) {
|
||||||
String tpsDelta = oneDecimal(Sensor.deltaTps);
|
String tpsDelta = twoDecimals(Sensor.deltaTps);
|
||||||
String elDelta = oneDecimal(Sensor.engineLoadAccelDelta);
|
String elDelta = twoDecimals(Sensor.engineLoadAccelDelta);
|
||||||
|
|
||||||
int tpsEnrichLength = ConfigField.getIntValue(ci, Fields.TPSACCELLENGTH);
|
int tpsEnrichLength = ConfigField.getIntValue(ci, Fields.TPSACCELLENGTH);
|
||||||
int elEnrichLength = ConfigField.getIntValue(ci, Fields.ENGINELOADACCELLENGTH);
|
int elEnrichLength = ConfigField.getIntValue(ci, Fields.ENGINELOADACCELLENGTH);
|
||||||
|
@ -145,7 +145,7 @@ public class FormulasPane {
|
||||||
|
|
||||||
double tpsAccelThreshold = ConfigField.getFloatValue(ci, Fields.TPSACCELENRICHMENTTHRESHOLD);
|
double tpsAccelThreshold = ConfigField.getFloatValue(ci, Fields.TPSACCELENRICHMENTTHRESHOLD);
|
||||||
String tpsAccelMult = "fixme";//ConfigField.getFloatValue(ci, Fields.TPSACCELENRICHMENTMULTIPLIER);
|
String tpsAccelMult = "fixme";//ConfigField.getFloatValue(ci, Fields.TPSACCELENRICHMENTMULTIPLIER);
|
||||||
String tpsAccelValue = oneDecimal(Sensor.tpsAccelFuel);
|
String tpsAccelValue = twoDecimals(Sensor.tpsAccelFuel);
|
||||||
|
|
||||||
double tpsDecelThreshold = ConfigField.getFloatValue(ci, Fields.TPSDECELENLEANMENTTHRESHOLD);
|
double tpsDecelThreshold = ConfigField.getFloatValue(ci, Fields.TPSDECELENLEANMENTTHRESHOLD);
|
||||||
double tpsDecelMult = ConfigField.getFloatValue(ci, Fields.TPSDECELENLEANMENTMULTIPLIER);
|
double tpsDecelMult = ConfigField.getFloatValue(ci, Fields.TPSDECELENLEANMENTMULTIPLIER);
|
||||||
|
@ -170,8 +170,8 @@ public class FormulasPane {
|
||||||
|
|
||||||
double rpm = SensorCentral.getInstance().getValue(Sensor.RPM);
|
double rpm = SensorCentral.getInstance().getValue(Sensor.RPM);
|
||||||
String RPM = "" + (int) rpm;
|
String RPM = "" + (int) rpm;
|
||||||
String VE = oneDecimal(Sensor.CURRENT_VE);
|
String VE = twoDecimals(Sensor.CURRENT_VE);
|
||||||
String TARGET_AFR = oneDecimal(Sensor.TARGET_AFR);
|
String TARGET_AFR = twoDecimals(Sensor.TARGET_AFR);
|
||||||
String tpsStr = oneDecimal(Sensor.TPS);
|
String tpsStr = oneDecimal(Sensor.TPS);
|
||||||
String chargeAirMass = String.format("%.3fgm", SensorCentral.getInstance().getValue(Sensor.CHARGE_AIR_MASS));
|
String chargeAirMass = String.format("%.3fgm", SensorCentral.getInstance().getValue(Sensor.CHARGE_AIR_MASS));
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ public class FormulasPane {
|
||||||
chargeAirMass +
|
chargeAirMass +
|
||||||
"$";
|
"$";
|
||||||
|
|
||||||
String baseFuelStr = oneDecimal(Sensor.FUEL_BASE);
|
String baseFuelStr = twoDecimals(Sensor.FUEL_BASE);
|
||||||
String baseFuel = "$Base_Fuel (ms) = \\frac{" +
|
String baseFuel = "$Base_Fuel (ms) = \\frac{" +
|
||||||
"($Airmass = " + chargeAirMass + ")" +
|
"($Airmass = " + chargeAirMass + ")" +
|
||||||
"}{" +
|
"}{" +
|
||||||
|
@ -200,13 +200,13 @@ public class FormulasPane {
|
||||||
" * (injectorFlow = " + injectorFlow + " cc/min)" +
|
" * (injectorFlow = " + injectorFlow + " cc/min)" +
|
||||||
"} = " + baseFuelStr + "ms$";
|
"} = " + baseFuelStr + "ms$";
|
||||||
|
|
||||||
String IATcorr = oneDecimal(Sensor.iatCorrection);
|
String IATcorr = twoDecimals(Sensor.iatCorrection);
|
||||||
String CLTcorr = oneDecimal(Sensor.cltCorrection);
|
String CLTcorr = twoDecimals(Sensor.cltCorrection);
|
||||||
String tpsAccel = oneDecimal(Sensor.tpsAccelFuel);
|
String tpsAccel = twoDecimals(Sensor.tpsAccelFuel);
|
||||||
|
|
||||||
String tempCorrections = " * cltCorr(" + CLTcorr + ") * iatCorr(" + IATcorr + ")";
|
String tempCorrections = " * cltCorr(" + CLTcorr + ") * iatCorr(" + IATcorr + ")";
|
||||||
|
|
||||||
String actualLastInjection = oneDecimal(Sensor.actualLastInjection);
|
String actualLastInjection = twoDecimals(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 + getInjecctorLag() +
|
tempCorrections + getInjecctorLag() +
|
||||||
|
@ -221,18 +221,26 @@ public class FormulasPane {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getInjecctorLag() {
|
private String getInjecctorLag() {
|
||||||
String vBatt = oneDecimal(Sensor.VBATT);
|
String vBatt = twoDecimals(Sensor.VBATT);
|
||||||
return "+ ( injectorLag(VBatt = " + vBatt + ") = " + oneDecimal(Sensor.injectorLagMs) + ")";
|
return "+ ( injectorLag(VBatt = " + vBatt + ") = " + twoDecimals(Sensor.injectorLagMs) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String oneDecimal(Sensor sensor) {
|
private String oneDecimal(Sensor sensor) {
|
||||||
return oneDecimal(SensorCentral.getInstance().getValue(sensor));
|
return oneDecimal(SensorCentral.getInstance().getValue(sensor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String twoDecimals(Sensor sensor) {
|
||||||
|
return twoDecimals(SensorCentral.getInstance().getValue(sensor));
|
||||||
|
}
|
||||||
|
|
||||||
private String oneDecimal(double ve) {
|
private String oneDecimal(double ve) {
|
||||||
return String.format("%.1f", ve);
|
return String.format("%.1f", ve);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String twoDecimals(double ve) {
|
||||||
|
return String.format("%.2f", ve);
|
||||||
|
}
|
||||||
|
|
||||||
public JPanel getContent() {
|
public JPanel getContent() {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue