auto-sync

This commit is contained in:
rusEfi 2017-02-09 22:02:07 -05:00
parent bbe29d64fd
commit 2b73087f01
9 changed files with 17 additions and 12 deletions

View File

@ -143,7 +143,7 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
boardConfiguration->idle.solenoidFrequency = 160;
boardConfiguration->idle.solenoidPin = GPIOB_9;
boardConfiguration->idle.solenoidPin = GPIOB_9; // this W61 <> W61 jumper
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;

View File

@ -718,6 +718,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
}
} else if (engineConfiguration->debugMode == DBG_VEHICLE_SPEED_SENSOR) {
tsOutputChannels->debugIntField1 = engine->engineState.vssCounter;
} else if (engineConfiguration->debugMode == DBG_SD_CARD) {
tsOutputChannels->debugIntField1 = engine->engineState.totalLoggedBytes;
}
tsOutputChannels->wallFuelAmount = ENGINE(wallFuel).getWallFuel(0);

View File

@ -149,7 +149,7 @@ EngineState::EngineState() {
warmupTargetAfr = airMass = 0;
baroCorrection = timingAdvance = fuelTankGauge = 0;
sparkDwell = mapAveragingDuration = 0;
injectionOffset = 0;
totalLoggedBytes = injectionOffset = 0;
}
void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_F) {

View File

@ -151,6 +151,7 @@ public:
float currentAfr;
int vssCounter;
int totalLoggedBytes;
/**

View File

@ -657,9 +657,13 @@ typedef enum {
DBG_IGNITION_TIMING = 10,
DBG_FUEL_PID_CORRECTION = 11,
DBG_VEHICLE_SPEED_SENSOR = 12,
DM_13 = 13,
DBG_SD_CARD = 13,
DM_14 = 14,
DM_15 = 15,
DM_16 = 16,
DM_17 = 17,
DM_18 = 18,
DM_19 = 19,
Force_4b_debug_mode_e = ENUM_32_BITS,
} debug_mode_e;

View File

@ -97,8 +97,6 @@ static FIL FDCurrFile;
static int logFileIndex = 1;
static char logName[_MAX_FILLER + 20];
static int totalLoggedBytes = 0;
static void printMmcPinout(void) {
scheduleMsg(&logger, "MMC CS %s", hwPortname(boardConfiguration->sdCardCsPin));
// todo: we need to figure out the right SPI pinout, not just SPI2
@ -112,7 +110,7 @@ static void sdStatistics(void) {
scheduleMsg(&logger, "SD enabled=%s status=%s", boolToString(boardConfiguration->isSdCardEnabled),
sdStatus);
if (fs_ready) {
scheduleMsg(&logger, "filename=%s size=%d", logName, totalLoggedBytes);
scheduleMsg(&logger, "filename=%s size=%d", logName, engine->engineState.totalLoggedBytes);
}
}
@ -308,7 +306,7 @@ void appendToLog(const char *line) {
return;
}
UINT lineLength = strlen(line);
totalLoggedBytes += lineLength;
engine->engineState.totalLoggedBytes += lineLength;
lockSpi(SPI_NONE);
FRESULT err = f_write(&FDLogFile, line, lineLength, &bytesWrited);
if (bytesWrited < lineLength) {

View File

@ -113,7 +113,7 @@ float baseFuel;+Fuel squirt duration while cranking\nA number of curves adjust t
int16_t rpm;+Cranking mode threshold. Special cranking logic controls fuel and spark while RPM is below this threshold\nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0
end_struct
#define debug_mode_e_enum "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "mode13", "mode14", "mode15"
#define debug_mode_e_enum "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "SD card", "mode14", "mode15"
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:3], @@debug_mode_e_enum@@
#define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7"

View File

@ -42,7 +42,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Feb 09 11:38:10 EST 2017
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Feb 09 21:42:21 EST 2017
pageSize = 16376
page = 1
@ -554,7 +554,7 @@ page = 1
tpsDecelEnleanmentThreshold = scalar, F32, 2232, "roc", 1, 0, 0, 200, 3
tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3
slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3
debugMode = bits, U32, 2244, [0:3], "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "mode13", "mode14", "mode15"
debugMode = bits, U32, 2244, [0:3], "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "SD card", "mode14", "mode15"
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, -1000, 1000, 5
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, -1000, 1000, 5
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, -1000, 1000, 5

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Feb 09 12:25:50 EST 2017
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Feb 09 21:42:21 EST 2017
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int FSIO_ADC_COUNT = 4;
@ -1508,7 +1508,7 @@ public class Fields {
public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2232, FieldType.FLOAT);
public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2236, FieldType.FLOAT);
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2240, FieldType.FLOAT);
public static final String[] debug_mode_e = {"Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "mode13", "mode14", "mode15"};
public static final String[] debug_mode_e = {"Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "VSS", "SD card", "mode14", "mode15"};
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2244, FieldType.INT, debug_mode_e);
public static final Field WARMUPAFRPID_PFACTOR = Field.create("WARMUPAFRPID_PFACTOR", 2248, FieldType.FLOAT);
public static final Field WARMUPAFRPID_IFACTOR = Field.create("WARMUPAFRPID_IFACTOR", 2252, FieldType.FLOAT);