From af7ad6ef89ddfc8be0baea0149c1b80982a5751f Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 21 Jul 2016 23:03:53 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/algo/aux_pid.cpp | 2 +- ...engine_configuration_generated_structures.h | 13 ++++++++----- firmware/controllers/algo/rusefi_generated.h | 10 +++++++--- firmware/controllers/algo/rusefi_types.h | 2 ++ firmware/integration/rusefi_config.txt | 6 ++++-- firmware/tunerstudio/rusefi.ini | 12 ++++++++---- firmware/tunerstudio/rusefi.input | 2 +- .../models/src/com/rusefi/config/Fields.java | 18 +++++++++++++----- 8 files changed, 44 insertions(+), 21 deletions(-) diff --git a/firmware/controllers/algo/aux_pid.cpp b/firmware/controllers/algo/aux_pid.cpp index 41f1cc892f..104a95beed 100644 --- a/firmware/controllers/algo/aux_pid.cpp +++ b/firmware/controllers/algo/aux_pid.cpp @@ -40,7 +40,7 @@ static msg_t auxPidThread(int param) { UNUSED(param); chRegSetThreadName("AuxPidController"); while (true) { - int dt = maxI(10, engineConfiguration->auxPid1DT); + int dt = maxI(10, engineConfiguration->auxPidDT[0]); chThdSleepMilliseconds(dt); if (parametersVersion.isOld()) diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 880c47f966..fdbc8f76e3 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 Tue Jul 19 09:56:19 EDT 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 21 22:52:35 EDT 2016 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1631,10 +1631,9 @@ typedef struct { */ float egoValueShift; /** - * Aux Pid #1 dTime * offset 2408 */ - int auxPid1DT; + int unusedauxPid1DT; /** * offset 2412 */ @@ -1687,7 +1686,11 @@ typedef struct { /** * offset 2488 */ - int unused[140]; + pid_dt auxPidDT[AUX_PID_COUNT]; + /** + * offset 2504 + */ + int unused[136]; /** total size 3048*/ } engine_configuration_s; @@ -1902,4 +1905,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jul 19 09:56:19 EDT 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 21 22:52:35 EDT 2016 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 6b08fd45e4..107cab8e12 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -828,8 +828,8 @@ #define mapHighValueVoltage_offset_hex 960 #define egoValueShift_offset 2404 #define egoValueShift_offset_hex 964 -#define auxPid1DT_offset 2408 -#define auxPid1DT_offset_hex 968 +#define unusedauxPid1DT_offset 2408 +#define unusedauxPid1DT_offset_hex 968 #define auxPid1_offset 2412 #define auxPid1_pFactor_offset 2412 #define auxPid1_iFactor_offset 2416 @@ -861,7 +861,11 @@ #define storageMode_offset 2476 #define cj125SpiDevice_offset 2480 #define cj125CsPinMode_offset 2484 -#define unused_offset 2488 +#define auxPidDT1_offset 2488 +#define auxPidDT2_offset 2492 +#define auxPidDT3_offset 2496 +#define auxPidDT4_offset 2500 +#define unused_offset 2504 #define le_formulas1_offset 3048 #define le_formulas2_offset 3248 #define le_formulas3_offset 3448 diff --git a/firmware/controllers/algo/rusefi_types.h b/firmware/controllers/algo/rusefi_types.h index 620ae63bbb..21d61b850c 100644 --- a/firmware/controllers/algo/rusefi_types.h +++ b/firmware/controllers/algo/rusefi_types.h @@ -23,6 +23,8 @@ typedef time_t efitimesec_t; */ typedef uint32_t efitimems_t; +typedef int pid_dt; + /** * We use a signed type here so that subtraction result is a proper negative value. * A typical use-case negative result is when we do 'timeNow() - timeOfEvent' where timeOfEvent diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index f66ad71774..c44ee07eea 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -506,6 +506,7 @@ bit is_enabled_spi_2 brain_pin_e acRelayPin; pin_output_mode_e acRelayPinMode; +custom pid_dt 4 U32 "ms", 1, 0, 0, 3000, 0 custom fsio_pwm_freq_t 2 scalar, U16, @OFFSET@, "Hz", 1, 0, 0, 3000, 0 fsio_pwm_freq_t[LE_COMMAND_COUNT iterate] fsioFrequency; @@ -715,7 +716,7 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, float mapLowValueVoltage;MAP voltage for low point;"v", 1, 0, 0.0, 10, 2 float mapHighValueVoltage;MAP voltage for low point;"v", 1, 0, 0.0, 10, 2 float egoValueShift;EGO value correction;"value", 1, 0, -10.0, 10, 2 - int auxPid1DT;Aux Pid #1 dTime;"ms", 1, 0, 0, 3000, 0 + int unusedauxPid1DT pid_s auxPid1; float crankingIdleAdjustment;Extra idle while cranking;"percent", 1, 0, -100.0, 100, float tChargeMinRpmMinTps; @@ -728,7 +729,8 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, mass_storage_e storageMode; spi_device_e cj125SpiDevice; pin_output_mode_e cj125CsPinMode; - int[140] unused; + pid_dt[AUX_PID_COUNT iterate] auxPidDT; + int[136] unused; end_struct diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 987fa6da0b..48a68bfb51 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 Thu Jul 21 16:21:57 EDT 2016 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 21 22:52:35 EDT 2016 pageSize = 16376 page = 1 @@ -574,7 +574,7 @@ page = 1 mapLowValueVoltage = scalar, F32, 2396, "v", 1, 0, 0.0, 10, 2 mapHighValueVoltage = scalar, F32, 2400, "v", 1, 0, 0.0, 10, 2 egoValueShift = scalar, F32, 2404, "value", 1, 0, -10.0, 10, 2 - auxPid1DT = scalar, S32, 2408, "ms", 1, 0, 0, 3000, 0 +;skipping unusedauxPid1DT offset 2408 auxPid1_pFactor = scalar, F32, 2412, "value", 1, 0, 0, 1000, 5 auxPid1_iFactor = scalar, F32, 2416, "value", 1, 0, 0, 1000, 5 auxPid1_dFactor = scalar, F32, 2420, "value", 1, 0, 0, 1000, 5 @@ -596,7 +596,11 @@ page = 1 storageMode = bits, U32, 2476, [0:1], "Auto", "Always", "Never" cj125SpiDevice = bits,U32, 2480, [0:1], "Off", "SPI1", "SPI2", "SPI3" cj125CsPinMode = bits, U32, 2484, [0:1], "default", "default inverted", "open collector", "open collector inverted" -;skipping unused offset 2488 + auxPidDT1 = U32 "ms", 1, 0, 0, 3000, 0 + auxPidDT2 = U32 "ms", 1, 0, 0, 3000, 0 + auxPidDT3 = U32 "ms", 1, 0, 0, 3000, 0 + auxPidDT4 = U32 "ms", 1, 0, 0, 3000, 0 +;skipping unused offset 2504 le_formulas1 = array, U08, 3048, [200],"char", 1, 0, 0.0, 3.0, 2 le_formulas2 = array, U08, 3248, [200],"char", 1, 0, 0.0, 3.0, 2 le_formulas3 = array, U08, 3448, [200],"char", 1, 0, 0.0, 3.0, 2 @@ -1685,7 +1689,7 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "PWM Frequency", auxPidFrequency1 field = "verbose", isVerboseAuxPid field = "#target based on FSIO map#1" - field = "control period", auxPid1DT, {activateAuxPid1 == 1} + field = "control period", auxPidDT1, {activateAuxPid1 == 1} field = "#PID control" field = "offset", auxPid1_offset, {activateAuxPid1 == 1} field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 493b9e1c30..54e8015f78 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1685,7 +1685,7 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "PWM Frequency", auxPidFrequency1 field = "verbose", isVerboseAuxPid field = "#target based on FSIO map#1" - field = "control period", auxPid1DT, {activateAuxPid1 == 1} + field = "control period", auxPidDT1, {activateAuxPid1 == 1} field = "#PID control" field = "offset", auxPid1_offset, {activateAuxPid1 == 1} field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index b363bc1520..ae57f1a583 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 Tue Jul 19 20:52:56 EDT 2016 +// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jul 21 22:52:35 EDT 2016 public class Fields { public static final int LE_COMMAND_LENGTH = 200; public static final int FSIO_ADC_COUNT = 4; @@ -832,8 +832,8 @@ public class Fields { public static final int mapHighValueVoltage_offset_hex = 960; public static final int egoValueShift_offset = 2404; public static final int egoValueShift_offset_hex = 964; - public static final int auxPid1DT_offset = 2408; - public static final int auxPid1DT_offset_hex = 968; + public static final int unusedauxPid1DT_offset = 2408; + public static final int unusedauxPid1DT_offset_hex = 968; public static final int auxPid1_offset = 2412; public static final int auxPid1_pFactor_offset = 2412; public static final int auxPid1_iFactor_offset = 2416; @@ -865,7 +865,11 @@ public class Fields { public static final int storageMode_offset = 2476; public static final int cj125SpiDevice_offset = 2480; public static final int cj125CsPinMode_offset = 2484; - public static final int unused_offset = 2488; + public static final int auxPidDT1_offset = 2488; + public static final int auxPidDT2_offset = 2492; + public static final int auxPidDT3_offset = 2496; + public static final int auxPidDT4_offset = 2500; + public static final int unused_offset = 2504; public static final int le_formulas1_offset = 3048; public static final int le_formulas2_offset = 3248; public static final int le_formulas3_offset = 3448; @@ -1455,7 +1459,7 @@ public class Fields { public static final Field MAPLOWVALUEVOLTAGE = Field.create("MAPLOWVALUEVOLTAGE", 2396, FieldType.FLOAT); public static final Field MAPHIGHVALUEVOLTAGE = Field.create("MAPHIGHVALUEVOLTAGE", 2400, FieldType.FLOAT); public static final Field EGOVALUESHIFT = Field.create("EGOVALUESHIFT", 2404, FieldType.FLOAT); - public static final Field AUXPID1DT = Field.create("AUXPID1DT", 2408, FieldType.INT); + public static final Field UNUSEDAUXPID1DT = Field.create("UNUSEDAUXPID1DT", 2408, FieldType.INT); public static final Field AUXPID1_PFACTOR = Field.create("AUXPID1_PFACTOR", 2412, FieldType.FLOAT); public static final Field AUXPID1_IFACTOR = Field.create("AUXPID1_IFACTOR", 2416, FieldType.FLOAT); public static final Field AUXPID1_DFACTOR = Field.create("AUXPID1_DFACTOR", 2420, FieldType.FLOAT); @@ -1478,6 +1482,10 @@ public class Fields { public static final Field STORAGEMODE = Field.create("STORAGEMODE", 2476, FieldType.INT, mass_storage_e); public static final Field CJ125SPIDEVICE = Field.create("CJ125SPIDEVICE", 2480, FieldType.INT); public static final Field CJ125CSPINMODE = Field.create("CJ125CSPINMODE", 2484, FieldType.INT, pin_output_mode_e); + public static final Field AUXPIDDT1 = Field.create("AUXPIDDT1", 2488, FieldType.INT); + public static final Field AUXPIDDT2 = Field.create("AUXPIDDT2", 2492, FieldType.INT); + public static final Field AUXPIDDT3 = Field.create("AUXPIDDT3", 2496, FieldType.INT); + public static final Field AUXPIDDT4 = Field.create("AUXPIDDT4", 2500, FieldType.INT); public static final Field LE_FORMULAS1 = Field.create("LE_FORMULAS1", 3048, FieldType.INT); public static final Field LE_FORMULAS2 = Field.create("LE_FORMULAS2", 3248, FieldType.INT); public static final Field LE_FORMULAS3 = Field.create("LE_FORMULAS3", 3448, FieldType.INT);