From 6f2ed91fa6cfd79ea9ad8810070a79a5ac496d7d Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 10 Apr 2017 14:34:09 -0400 Subject: [PATCH] #393 --- ...engine_configuration_generated_structures.h | 18 +++++++++++++----- firmware/controllers/algo/rusefi_generated.h | 16 ++++++++++------ firmware/integration/rusefi_config.txt | 9 ++++++--- firmware/tunerstudio/rusefi.ini | 14 ++++++++++---- firmware/tunerstudio/rusefi.input | 4 ++++ .../models/src/com/rusefi/config/Fields.java | 16 ++++++++++------ 6 files changed, 53 insertions(+), 24 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 8cede97fd6..1ab0ebba09 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 Mon Apr 03 21:10:42 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 10 14:24:47 EDT 2017 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -644,11 +644,11 @@ typedef struct { /** * offset 576 */ - int unused77; + float alternatorPidMin; /** * offset 580 */ - int unused78; + float alternatorPidMax; /** * offset 584 */ @@ -1842,7 +1842,15 @@ typedef struct { /** * offset 2824 */ - int unused[56]; + float aux1PidMin; + /** + * offset 2828 + */ + float aux1PidMax; + /** + * offset 2832 + */ + int unused[54]; /** total size 3048*/ } engine_configuration_s; @@ -2057,4 +2065,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 03 21:10:42 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 10 14:24:47 EDT 2017 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 492b5ca10c..7cdf23aa03 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -677,10 +677,10 @@ #define gpioPinModes16_offset_hex 4a8 #define consoleUartDevice_offset 1196 #define consoleUartDevice_offset_hex 4ac -#define unused77_offset 1200 -#define unused77_offset_hex 4b0 -#define unused78_offset 1204 -#define unused78_offset_hex 4b4 +#define alternatorPidMin_offset 1200 +#define alternatorPidMin_offset_hex 4b0 +#define alternatorPidMax_offset 1204 +#define alternatorPidMax_offset_hex 4b4 #define nb2ratioFrom_offset 1208 #define nb2ratioFrom_offset_hex 4b8 #define nb2ratioTo_offset 1212 @@ -1361,8 +1361,12 @@ #define timing_offset_cylinder11_offset_hex b00 #define timing_offset_cylinder12_offset 2820 #define timing_offset_cylinder12_offset_hex b04 -#define unused_offset 2824 -#define unused_offset_hex b08 +#define aux1PidMin_offset 2824 +#define aux1PidMin_offset_hex b08 +#define aux1PidMax_offset 2828 +#define aux1PidMax_offset_hex b0c +#define unused_offset 2832 +#define unused_offset_hex b10 #define le_formulas1_offset 3048 #define le_formulas1_offset_hex be8 #define le_formulas2_offset 3248 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 54cf6c7e18..840b54beb9 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -524,8 +524,8 @@ bit is_enabled_spi_2 custom uart_device_e 4 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" uart_device_e consoleUartDevice; - int unused77; - int unused78; + float alternatorPidMin;;"v", 1, 0, 0, 3000.0, 3 + float alternatorPidMax;;"v", 1, 0, 0, 3000.0, 3 float nb2ratioFrom;;"value", 1, 0, 0, 1000, 5 float nb2ratioTo;;"value", 1, 0, 0, 1000, 5 @@ -791,7 +791,10 @@ int16_t etbFreq;;"Hz", 1, 0, 0, 500, 10 custom cfg_float_t_1f 4 scalar, F32, @OFFSET@, "Val", 1, 0, -20000000, 20000000, 1 cfg_float_t_1f[IGNITION_PIN_COUNT iterate] timing_offset_cylinder; - int[56] unused; + float aux1PidMin;;"v", 1, 0, 0, 3000.0, 3 + float aux1PidMax;;"v", 1, 0, 0, 3000.0, 3 + + int[54] unused; end_struct diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 69b4167501..e7400821b1 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -44,7 +44,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 Sun Apr 09 21:59:09 EDT 2017 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 10 14:24:47 EDT 2017 pageSize = 16376 page = 1 @@ -343,8 +343,8 @@ page = 1 gpioPinModes15 = bits, U32, 1188, [0:1], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes16 = bits, U32, 1192, [0:1], "default", "default inverted", "open collector", "open collector inverted" consoleUartDevice = bits,U32, 1196, [0:1], "Off", "UART1", "UART2", "UART3" -;skipping unused77 offset 1200 -;skipping unused78 offset 1204 + alternatorPidMin = scalar, F32, 1200, "v", 1, 0, 0, 3000.0, 3 + alternatorPidMax = scalar, F32, 1204, "v", 1, 0, 0, 3000.0, 3 nb2ratioFrom = scalar, F32, 1208, "value", 1, 0, 0, 1000, 5 nb2ratioTo = scalar, F32, 1212, "value", 1, 0, 0, 1000, 5 triggerErrorPin = bits, U32, 1216, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -671,7 +671,9 @@ page = 1 timing_offset_cylinder10 = scalar, F32, 2812, "Val", 1, 0, -20000000, 20000000, 1 timing_offset_cylinder11 = scalar, F32, 2816, "Val", 1, 0, -20000000, 20000000, 1 timing_offset_cylinder12 = scalar, F32, 2820, "Val", 1, 0, -20000000, 20000000, 1 -;skipping unused offset 2824 + aux1PidMin = scalar, F32, 2824, "v", 1, 0, 0, 3000.0, 3 + aux1PidMax = scalar, F32, 2828, "v", 1, 0, 0, 3000.0, 3 +;skipping unused offset 2832 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 @@ -2024,6 +2026,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", aux1PidMin + field = "Max", aux1PidMax field = "FSIO pin #2", auxPidPins2 field = "FSIO pin #3", auxPidPins3 field = "FSIO pin #4", auxPidPins4 @@ -2047,6 +2051,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "P factor", alternatorControl_pFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "I factor", alternatorControl_iFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "D factor", alternatorControl_dFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Min", alternatorPidMin + field = "Max", alternatorPidMax field = "#% duty = Pterm + Iterm + Dterm + offset%" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 88393cbc80..8364415ba0 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1295,6 +1295,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", aux1PidMin + field = "Max", aux1PidMax field = "FSIO pin #2", auxPidPins2 field = "FSIO pin #3", auxPidPins3 field = "FSIO pin #4", auxPidPins4 @@ -1318,6 +1320,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "P factor", alternatorControl_pFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "I factor", alternatorControl_iFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "D factor", alternatorControl_dFactor, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Min", alternatorPidMin + field = "Max", alternatorPidMax field = "#% duty = Pterm + Iterm + Dterm + offset%" diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index ec8ed3c1e0..ea79ecfc9c 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 Sun Apr 09 21:59:09 EDT 2017 +// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Apr 10 14:24:47 EDT 2017 public class Fields { public static final int LE_COMMAND_LENGTH = 200; public static final int FSIO_ADC_COUNT = 4; @@ -510,8 +510,8 @@ public class Fields { public static final int gpioPinModes15_offset = 1188; public static final int gpioPinModes16_offset = 1192; public static final int consoleUartDevice_offset = 1196; - public static final int unused77_offset = 1200; - public static final int unused78_offset = 1204; + public static final int alternatorPidMin_offset = 1200; + public static final int alternatorPidMax_offset = 1204; public static final int nb2ratioFrom_offset = 1208; public static final int nb2ratioTo_offset = 1212; public static final int triggerErrorPin_offset = 1216; @@ -948,7 +948,9 @@ public class Fields { public static final int timing_offset_cylinder10_offset = 2812; public static final int timing_offset_cylinder11_offset = 2816; public static final int timing_offset_cylinder12_offset = 2820; - public static final int unused_offset = 2824; + public static final int aux1PidMin_offset = 2824; + public static final int aux1PidMax_offset = 2828; + public static final int unused_offset = 2832; public static final int le_formulas1_offset = 3048; public static final int le_formulas2_offset = 3248; public static final int le_formulas3_offset = 3448; @@ -1323,8 +1325,8 @@ public class Fields { public static final Field GPIOPINMODES15 = Field.create("GPIOPINMODES15", 1188, FieldType.INT, pin_output_mode_e); public static final Field GPIOPINMODES16 = Field.create("GPIOPINMODES16", 1192, FieldType.INT, pin_output_mode_e); public static final Field CONSOLEUARTDEVICE = Field.create("CONSOLEUARTDEVICE", 1196, FieldType.INT); - public static final Field UNUSED77 = Field.create("UNUSED77", 1200, FieldType.INT); - public static final Field UNUSED78 = Field.create("UNUSED78", 1204, FieldType.INT); + public static final Field ALTERNATORPIDMIN = Field.create("ALTERNATORPIDMIN", 1200, FieldType.FLOAT); + public static final Field ALTERNATORPIDMAX = Field.create("ALTERNATORPIDMAX", 1204, FieldType.FLOAT); public static final Field NB2RATIOFROM = Field.create("NB2RATIOFROM", 1208, FieldType.FLOAT); public static final Field NB2RATIOTO = Field.create("NB2RATIOTO", 1212, FieldType.FLOAT); public static final Field TRIGGERERRORPIN = Field.create("TRIGGERERRORPIN", 1216, FieldType.INT, brain_pin_e); @@ -1639,6 +1641,8 @@ public class Fields { public static final Field TIMING_OFFSET_CYLINDER10 = Field.create("TIMING_OFFSET_CYLINDER10", 2812, FieldType.INT); public static final Field TIMING_OFFSET_CYLINDER11 = Field.create("TIMING_OFFSET_CYLINDER11", 2816, FieldType.INT); public static final Field TIMING_OFFSET_CYLINDER12 = Field.create("TIMING_OFFSET_CYLINDER12", 2820, FieldType.INT); + public static final Field AUX1PIDMIN = Field.create("AUX1PIDMIN", 2824, FieldType.FLOAT); + public static final Field AUX1PIDMAX = Field.create("AUX1PIDMAX", 2828, FieldType.FLOAT); 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);