auto-sync

This commit is contained in:
rusEfi 2017-02-18 15:01:47 -05:00
parent 1ad2c68a64
commit e77666ef2e
10 changed files with 42 additions and 42 deletions

View File

@ -230,8 +230,8 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
* so that we can prepare some helper structures
*/
void Engine::preCalculate() {
sparkTable.preCalc(engineConfiguration->sparkDwellBins,
engineConfiguration->sparkDwell);
sparkTable.preCalc(engineConfiguration->sparkDwellRpmBins,
engineConfiguration->sparkDwellValues);
/**
* Here we prepare a fast, index-based MAF lookup from a slower curve description

View File

@ -168,8 +168,8 @@ void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_F) {
*/
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_S) {
for (int i = 0; i < DWELL_CURVE_SIZE; i++) {
engineConfiguration->sparkDwellBins[i] = 1000 * i;
engineConfiguration->sparkDwell[i] = dwellMs;
engineConfiguration->sparkDwellRpmBins[i] = 1000 * i;
engineConfiguration->sparkDwellValues[i] = dwellMs;
}
}

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Feb 15 10:33:44 EST 2017
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Feb 18 13:57:17 EST 2017
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -970,11 +970,11 @@ typedef struct {
/**
* offset 336
*/
float sparkDwellBins[DWELL_CURVE_SIZE];
float sparkDwellRpmBins[DWELL_CURVE_SIZE];
/**
* offset 368
*/
float sparkDwell[DWELL_CURVE_SIZE];
float sparkDwellValues[DWELL_CURVE_SIZE];
/**
* offset 400
*/
@ -2051,4 +2051,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Feb 15 10:33:44 EST 2017
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Feb 18 13:57:17 EST 2017

View File

@ -177,10 +177,10 @@
#define hip9011PrescalerAndSDO_offset 328
#define hip9011PrescalerAndSDO_offset_hex 148
#define knockBandCustom_offset 332
#define sparkDwellBins_offset 336
#define sparkDwellBins_offset_hex 150
#define sparkDwell_offset 368
#define sparkDwell_offset_hex 170
#define sparkDwellRpmBins_offset 336
#define sparkDwellRpmBins_offset_hex 150
#define sparkDwellValues_offset 368
#define sparkDwellValues_offset_hex 170
#define specs_offset 400
#define specs_offset_hex 190
#define displacement_offset 400

View File

@ -176,7 +176,7 @@ void onUnlockHook(void) {
}
void initErrorHandling(void) {
#if EFI_SIMULATOR || EFI_PROD_CODE
#if EFI_SIMULATOR || EFI_PROD_CODE || defined(__DOXYGEN__)
msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0);
msObjectInit(&firmwareErrorMessageStream, errorMessageBuffer, sizeof(errorMessageBuffer), 0);
#endif
@ -184,7 +184,7 @@ void initErrorHandling(void) {
}
void firmwareError(obd_code_e code, const char *fmt, ...) {
#if EFI_PROD_CODE
#if EFI_PROD_CODE || defined(__DOXYGEN__)
if (hasFirmwareErrorFlag)
return;
addWarningCode(code);
@ -215,7 +215,7 @@ void firmwareError(obd_code_e code, const char *fmt, ...) {
vprintf(fmt, ap);
va_end(ap);
#if EFI_SIMULATOR
#if EFI_SIMULATOR || defined(__DOXYGEN__)
exit(-1);
#endif /* EFI_SIMULATOR */
#endif

View File

@ -77,18 +77,18 @@ float getEngineLoadT(DECLARE_ENGINE_PARAMETER_F) {
void setSingleCoilDwell(engine_configuration_s *engineConfiguration) {
for (int i = 0; i < DWELL_CURVE_SIZE; i++) {
engineConfiguration->sparkDwellBins[i] = i + 1;
engineConfiguration->sparkDwell[i] = 4;
engineConfiguration->sparkDwellRpmBins[i] = i + 1;
engineConfiguration->sparkDwellValues[i] = 4;
}
engineConfiguration->sparkDwellBins[5] = 10;
engineConfiguration->sparkDwell[5] = 4;
engineConfiguration->sparkDwellRpmBins[5] = 10;
engineConfiguration->sparkDwellValues[5] = 4;
engineConfiguration->sparkDwellBins[6] = 4500;
engineConfiguration->sparkDwell[6] = 4;
engineConfiguration->sparkDwellRpmBins[6] = 4500;
engineConfiguration->sparkDwellValues[6] = 4;
engineConfiguration->sparkDwellBins[7] = 12500;
engineConfiguration->sparkDwell[7] = 0;
engineConfiguration->sparkDwellRpmBins[7] = 12500;
engineConfiguration->sparkDwellValues[7] = 0;
}
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
@ -223,7 +223,7 @@ floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_S) {
} else {
efiAssert(!cisnan(rpm), "invalid rpm", NAN);
dwellMs = interpolate2d(rpm, engineConfiguration->sparkDwellBins, engineConfiguration->sparkDwell, DWELL_CURVE_SIZE);
dwellMs = interpolate2d(rpm, engineConfiguration->sparkDwellRpmBins, engineConfiguration->sparkDwellValues, DWELL_CURVE_SIZE);
}
if (cisnan(dwellMs) || dwellMs < 0) {
@ -424,8 +424,8 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F) {
printf("cranking angle %f\r\n", maxDwellAngle);
for (int i = 0;i<DWELL_CURVE_SIZE;i++) {
int rpm = (int)engineConfiguration->sparkDwellBins[i];
floatms_t dwell = engineConfiguration->sparkDwell[i];
int rpm = (int)engineConfiguration->sparkDwellRpmBins[i];
floatms_t dwell = engineConfiguration->sparkDwellValues[i];
angle_t dwellAngle = dwell / getOneDegreeTimeMs(rpm);
printf("dwell angle %f at %d\r\n", dwellAngle, rpm);
maxDwellAngle = maxF(maxDwellAngle, dwellAngle);

View File

@ -248,8 +248,8 @@ ThermistorConf iat;
float knockBandCustom;+kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2
float[DWELL_CURVE_SIZE] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_CURVE_SIZE] sparkDwell;;"ms", 1, 0.0, 0.0, 30.0, 2
float[DWELL_CURVE_SIZE] sparkDwellRpmBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_CURVE_SIZE] sparkDwellValues;;"ms", 1, 0.0, 0.0, 30.0, 2
struct_no_prefix specs_s
float displacement;Engine displacement, in liters\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2

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 Fri Feb 17 20:09:10 EST 2017
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Feb 18 13:57:17 EST 2017
pageSize = 16376
page = 1
@ -119,8 +119,8 @@ page = 1
step1timing = scalar, S32, 324, "deg", 1, 0, -180, 180, 2
hip9011PrescalerAndSDO = scalar, S32, 328, "integer", 1, 0.0, 0.0, 32, 0
knockBandCustom = scalar, F32, 332, "kHz", 1, 0.0, 0.0, 10.0, 2
sparkDwellBins = array, F32, 336, [8], "RPM", 1, 0.0, 0.0, 18000, 2
sparkDwell = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2
sparkDwellRpmBins = array, F32, 336, [8], "RPM", 1, 0.0, 0.0, 18000, 2
sparkDwellValues = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2
displacement = scalar, F32, 400, "L", 1, 0, 0, 1000.0, 2
cylindersCount = bits, U32, 404, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID"
firingOrder = bits, U32, 408, [0:4], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-2-4-5-3", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "1-6-3-2-5-4", "1-10-9-4-3-6-5-8-7_2", "1-7-5-11-3-9-6-12-2-8-4-10", "fo16", "fo17", "INVALID"
@ -950,8 +950,8 @@ fileVersion = { 20161225 }
columnLabel = "RPM", "Dwell"
xAxis = 0, 8000, 10
yAxis = 0, 30, 10
xBins = sparkDwellBins, rpm
yBins = sparkDwell
xBins = sparkDwellRpmBins, rpm
yBins = sparkDwellValues
gauge = rpm
curve = map_samplingAngleCurve, "MAP Sampling Start Angle"

View File

@ -119,8 +119,8 @@ page = 1
step1timing = scalar, S32, 324, "deg", 1, 0, -180, 180, 2
hip9011PrescalerAndSDO = scalar, S32, 328, "integer", 1, 0.0, 0.0, 32, 0
knockBandCustom = scalar, F32, 332, "kHz", 1, 0.0, 0.0, 10.0, 2
sparkDwellBins = array, F32, 336, [8], "RPM", 1, 0.0, 0.0, 18000, 2
sparkDwell = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2
sparkDwellRpmBins = array, F32, 336, [8], "RPM", 1, 0.0, 0.0, 18000, 2
sparkDwellValues = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2
displacement = scalar, F32, 400, "L", 1, 0, 0, 1000.0, 2
cylindersCount = bits, U32, 404, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID"
firingOrder = bits, U32, 408, [0:3], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-5-3-6-2-4", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "fo13", "fo14", "INVALID"
@ -882,8 +882,8 @@ fileVersion = { 20161225 }
columnLabel = "RPM", "Dwell"
xAxis = 0, 8000, 10
yAxis = 0, 30, 10
xBins = sparkDwellBins, rpm
yBins = sparkDwell
xBins = sparkDwellRpmBins, rpm
yBins = sparkDwellValues
gauge = rpm
curve = map_samplingAngleCurve, "MAP Sampling Start Angle"

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Feb 15 10:33:44 EST 2017
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Feb 18 13:57:17 EST 2017
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int FSIO_ADC_COUNT = 4;
@ -181,10 +181,10 @@ public class Fields {
public static final int hip9011PrescalerAndSDO_offset = 328;
public static final int hip9011PrescalerAndSDO_offset_hex = 148;
public static final int knockBandCustom_offset = 332;
public static final int sparkDwellBins_offset = 336;
public static final int sparkDwellBins_offset_hex = 150;
public static final int sparkDwell_offset = 368;
public static final int sparkDwell_offset_hex = 170;
public static final int sparkDwellRpmBins_offset = 336;
public static final int sparkDwellRpmBins_offset_hex = 150;
public static final int sparkDwellValues_offset = 368;
public static final int sparkDwellValues_offset_hex = 170;
public static final int specs_offset = 400;
public static final int specs_offset_hex = 190;
public static final int displacement_offset = 400;