auto-sync

This commit is contained in:
rusEfi 2016-08-27 11:02:34 -04:00
parent f0e656f644
commit e10bc29989
7 changed files with 38 additions and 15 deletions

View File

@ -27,7 +27,7 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// triggerConfig->customSkippedToothCount = 0;
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER);

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Aug 23 20:59:13 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Aug 27 10:09:22 EDT 2016
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -1132,6 +1132,7 @@ typedef struct {
*/
float maxKnockSubDeg;
/**
* See hasMafSensor
* offset 580
*/
adc_channel_e mafAdcChannel;
@ -1198,6 +1199,7 @@ typedef struct {
offset 1488 bit 13 */
bool isAlternatorControlEnabled : 1;
/**
* See mafAdcChannel
offset 1488 bit 14 */
bool hasMafSensor : 1;
/**
@ -1927,4 +1929,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Aug 23 20:59:13 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Aug 27 10:09:22 EDT 2016

View File

@ -183,8 +183,11 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
efiAssertVoid(engine!=NULL, "engine is NULL");
if (cisnan(engine->rpmCalculator.oneDegreeUs))
if (cisnan(engine->rpmCalculator.oneDegreeUs)) {
// in order to have fuel schedule we need to have current RPM
// wonder if this line slows engine startup?
return;
}
efiAssertVoid(!cisnan(engine->rpmCalculator.oneDegreeUs), "NAN one deg");

View File

@ -183,11 +183,11 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int eventIndex, bool limitedF
}
}
static ALWAYS_INLINE void handleFuel(bool limitedFuel, uint32_t eventIndex, int rpm DECLARE_ENGINE_PARAMETER_S) {
static ALWAYS_INLINE void handleFuel(bool limitedFuel, uint32_t currentEventIndex, int rpm DECLARE_ENGINE_PARAMETER_S) {
if (!isInjectionEnabled(engineConfiguration))
return;
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#3");
efiAssertVoid(eventIndex < ENGINE(triggerShape.getLength()), "handleFuel/event index");
efiAssertVoid(currentEventIndex < ENGINE(triggerShape.getLength()), "handleFuel/event index");
/**
* Ignition events are defined by addFuelEvents() according to selected
@ -197,7 +197,7 @@ static ALWAYS_INLINE void handleFuel(bool limitedFuel, uint32_t eventIndex, int
InjectionEventList *injectionEvents = &fs->injectionEvents;
if (!fs->hasEvents[eventIndex])
if (!fs->hasEvents[currentEventIndex])
return;
#if EFI_DEFAILED_LOGGING || defined(__DOXYGEN__)
@ -211,7 +211,7 @@ static ALWAYS_INLINE void handleFuel(bool limitedFuel, uint32_t eventIndex, int
for (int injEventIndex = 0; injEventIndex < injectionEvents->size; injEventIndex++) {
InjectionEvent *event = &injectionEvents->elements[injEventIndex];
if (event->injectionStart.eventIndex != eventIndex) {
if (event->injectionStart.eventIndex != currentEventIndex) {
continue;
}
handleFuelInjectionEvent(injEventIndex, limitedFuel, event, rpm PASS_ENGINE_PARAMETER);

View File

@ -355,7 +355,7 @@ float globalFuelCorrection;;"coef", 1, 0.0, 0, 1000.0, 2
int16_t pedalPositionMin;
int16_t pedalPositionMax;
float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking
adc_channel_e mafAdcChannel;
adc_channel_e mafAdcChannel;See hasMafSensor
struct afr_sensor_s
adc_channel_e hwChannel;
@ -573,7 +573,7 @@ bit hasMapSensor;@see isMapAveragingEnabled
bit isJoystickEnabled
bit isGpsEnabled
bit isAlternatorControlEnabled
bit hasMafSensor
bit hasMafSensor;See mafAdcChannel
bit hasTpsSensor
bit cutFuelOnHardLimit
bit cutSparkOnHardLimit

View File

@ -38,7 +38,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
* @see EngineSnifferPanel
*/
public class Launcher {
public static final int CONSOLE_VERSION = 20160821;
public static final int CONSOLE_VERSION = 20160826;
public static final boolean SHOW_STIMULATOR = false;
private static final String TAB_INDEX = "main_tab";
protected static final String PORT_KEY = "port";

View File

@ -87,6 +87,21 @@ public class FormulasPane {
String page;
if (algo == engine_load_mode_e.LM_SPEED_DENSITY) {
page = getSpeedDensity(ci, acceleration);
} else if (algo == engine_load_mode_e.LM_PLAIN_MAF) {
double rpm = SensorCentral.getInstance().getValue(Sensor.RPM);
double maf = SensorCentral.getInstance().getValue(Sensor.MAF);
String baseFuelStr = oneDecimal(Sensor.FUEL_BASE);
String baseFuel = "$Base_Fuel (ms) = lookup (" +
"(RPM = " + rpm + ", " +
"MAF = " + maf + ") = " +
baseFuelStr + "ms";
String actualLastInjection = oneDecimal(Sensor.actualLastInjection);
String injTime = "$Fuel (ms) = " + baseFuel + getInjecctorLag() +
" = " + actualLastInjection + "ms_per_injection$";
page = acceleration + injTime;
} else {
page = acceleration + "todo";
}
@ -147,7 +162,6 @@ public class FormulasPane {
String TARGET_AFR = oneDecimal(Sensor.TARGET_AFR);
String tpsStr = oneDecimal(Sensor.TPS);
String chargeAirMass = String.format("%.3fgm", SensorCentral.getInstance().getValue(Sensor.CHARGE_AIR_MASS));
String vBatt = oneDecimal(Sensor.VBATT);
double displacement = ConfigField.getFloatValue(ci, Fields.DISPLACEMENT);
int cylinderCount = ConfigField.getIntValue(ci, Fields.CYLINDERSCOUNT);
@ -180,12 +194,10 @@ public class FormulasPane {
String tempCorrections = " * cltCorr(" + CLTcorr + ") * iatCorr(" + IATcorr + ")";
String injectorLag = "+ ( injectorLag(VBatt = " + vBatt + ") = " + oneDecimal(Sensor.injectorLagMs) + ")";
String actualLastInjection = oneDecimal(Sensor.actualLastInjection);
String injTime = "$Fuel (ms) = " +
"(Base_Fuel (" + baseFuelStr + "ms) + Tps_Accel_Corr = (" + tpsAccel + "ms))" +
tempCorrections + injectorLag +
tempCorrections + getInjecctorLag() +
" = " + actualLastInjection + "ms_per_injection$";
return acceleration +
@ -195,6 +207,12 @@ public class FormulasPane {
injTime + newLine;
}
@NotNull
private String getInjecctorLag() {
String vBatt = oneDecimal(Sensor.VBATT);
return "+ ( injectorLag(VBatt = " + vBatt + ") = " + oneDecimal(Sensor.injectorLagMs) + ")";
}
private String oneDecimal(Sensor sensor) {
return oneDecimal(SensorCentral.getInstance().getValue(sensor));
}