From e77666ef2ec766daddeba9c8b74a0c17870115ec Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 18 Feb 2017 15:01:47 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/algo/engine.cpp | 4 ++-- .../controllers/algo/engine_configuration.cpp | 4 ++-- ...ngine_configuration_generated_structures.h | 8 +++---- firmware/controllers/algo/rusefi_generated.h | 8 +++---- firmware/controllers/error_handling.cpp | 6 ++--- firmware/controllers/math/engine_math.cpp | 22 +++++++++---------- firmware/integration/rusefi_config.txt | 4 ++-- firmware/tunerstudio/rusefi.ini | 10 ++++----- firmware/tunerstudio/rusefi.input | 8 +++---- .../models/src/com/rusefi/config/Fields.java | 10 ++++----- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 922a2eb4e4..37d2ea0800 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -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 diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 4e3cac6d7b..2d06542c4d 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -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; } } diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 8db85f5310..3b391cf7a1 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -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 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index b1d4232a55..6e0d29614c 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -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 diff --git a/firmware/controllers/error_handling.cpp b/firmware/controllers/error_handling.cpp index cfc3995d06..020af6c6e3 100644 --- a/firmware/controllers/error_handling.cpp +++ b/firmware/controllers/error_handling.cpp @@ -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 diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index b800bfc91f..3c3523aff1 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -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;isparkDwellBins[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); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 27f253870d..585d87eaf1 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -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 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 999bf8995e..a73cfd6be6 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -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" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 36f32a5a10..1868384926 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -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" diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index a2da1a3f2b..5f7c6ba2c7 100644 --- a/java_console/models/src/com/rusefi/config/Fields.java +++ b/java_console/models/src/com/rusefi/config/Fields.java @@ -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;