diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index a83d71bea1..9e5d66ac64 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat Jun 27 22:18:44 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Sun Jun 28 14:03:24 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -3522,4 +3522,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat Jun 27 22:18:44 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Sun Jun 28 14:03:24 UTC 2020 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 87dcadebb6..998dceb7e8 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1,5 +1,5 @@ // -// was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt +// was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt // #define absoluteFuelPressure_offset 76 diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 26b997cdd1..9515c06111 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 22:18:29 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -3522,4 +3522,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 22:18:29 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 diff --git a/firmware/controllers/generated/engine_state_generated.h b/firmware/controllers/generated/engine_state_generated.h index a66a11d285..421ca30f9b 100644 --- a/firmware/controllers/generated/engine_state_generated.h +++ b/firmware/controllers/generated/engine_state_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/engine_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_STATE_GENERATED_H @@ -430,4 +430,4 @@ typedef struct engine_state2_s engine_state2_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/engine_state.txt Sun Jun 28 14:03:25 UTC 2020 diff --git a/firmware/controllers/generated/fsio_enums_generated.def b/firmware/controllers/generated/fsio_enums_generated.def index 31c59c7065..dbdcacbdce 100644 --- a/firmware/controllers/generated/fsio_enums_generated.def +++ b/firmware/controllers/generated/fsio_enums_generated.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Jun 01 07:18:30 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.FileFsioSettingsConsumer FSIO_SETTING_FANONTEMPERATURE = 1000, diff --git a/firmware/controllers/generated/fsio_getters.def b/firmware/controllers/generated/fsio_getters.def index b2ae42ea9a..4315889417 100644 --- a/firmware/controllers/generated/fsio_getters.def +++ b/firmware/controllers/generated/fsio_getters.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Jun 01 07:18:30 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/fsio_names.def b/firmware/controllers/generated/fsio_names.def index 1dda3f5685..cdfd38496a 100644 --- a/firmware/controllers/generated/fsio_names.def +++ b/firmware/controllers/generated/fsio_names.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Jun 01 07:18:30 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.FileFsioSettingsConsumer static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature"); diff --git a/firmware/controllers/generated/fsio_strings.def b/firmware/controllers/generated/fsio_strings.def index 4e7d9e064f..17a2784838 100644 --- a/firmware/controllers/generated/fsio_strings.def +++ b/firmware/controllers/generated/fsio_strings.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Jun 01 07:18:30 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/pid_state_generated.h b/firmware/controllers/generated/pid_state_generated.h index e9247d4a92..c1c6195787 100644 --- a/firmware/controllers/generated/pid_state_generated.h +++ b/firmware/controllers/generated/pid_state_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/pid_state.txt Sun Sep 01 19:07:42 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/pid_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_PID_STATE_GENERATED_H @@ -45,4 +45,4 @@ typedef struct pid_state_s pid_state_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/pid_state.txt Sun Sep 01 19:07:42 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/pid_state.txt Sun Jun 28 14:03:25 UTC 2020 diff --git a/firmware/controllers/generated/trigger_central_generated.h b/firmware/controllers/generated/trigger_central_generated.h index d8168698d3..6bae809646 100644 --- a/firmware/controllers/generated/trigger_central_generated.h +++ b/firmware/controllers/generated/trigger_central_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Fri Apr 10 12:53:33 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_central.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_TRIGGER_CENTRAL_GENERATED_H @@ -32,4 +32,4 @@ typedef struct trigger_central_s trigger_central_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Fri Apr 10 12:53:33 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_central.txt Sun Jun 28 14:03:25 UTC 2020 diff --git a/firmware/controllers/generated/trigger_state_generated.h b/firmware/controllers/generated/trigger_state_generated.h index 5333bb6bd8..839187f14a 100644 --- a/firmware/controllers/generated/trigger_state_generated.h +++ b/firmware/controllers/generated/trigger_state_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Tue Sep 03 19:14:16 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_TRIGGER_STATE_GENERATED_H @@ -17,4 +17,4 @@ typedef struct trigger_state_s trigger_state_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Tue Sep 03 19:14:16 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_state.txt Sun Jun 28 14:03:25 UTC 2020 diff --git a/firmware/controllers/generated/wall_fuel_generated.h b/firmware/controllers/generated/wall_fuel_generated.h index 5f8a42108c..28a7bd191d 100644 --- a/firmware/controllers/generated/wall_fuel_generated.h +++ b/firmware/controllers/generated/wall_fuel_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel.txt Sat Aug 31 23:11:37 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/wall_fuel_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_WALL_FUEL_GENERATED_H @@ -23,4 +23,4 @@ typedef struct wall_fuel_state wall_fuel_state; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel.txt Sat Aug 31 23:11:37 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/wall_fuel_state.txt Sun Jun 28 14:03:25 UTC 2020 diff --git a/firmware/tunerstudio/cache/firing_order.h b/firmware/tunerstudio/cache/firing_order.h index e69de29bb2..51fe262d27 100644 --- a/firmware/tunerstudio/cache/firing_order.h +++ b/firmware/tunerstudio/cache/firing_order.h @@ -0,0 +1,69 @@ +/* + * @file firing_order.h + * + * See also FiringOrderTSLogic.java + * + * @date Jul 20, 2016 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#include "rusefi_enums.h" + +#pragma once + +typedef enum { + FO_1 = 0, + + // 2 cylinder + FO_1_2 = 8, + + // 3 cylinder + FO_1_2_3 = 10, + FO_1_3_2 = 24, + + // 4 cylinder + FO_1_3_4_2 = 1, // typical inline 4 + FO_1_2_4_3 = 2, + FO_1_3_2_4 = 3, // for example horizontally opposed engine + FO_1_4_3_2 = 17, // for example VW aircooled boxer engine + + // 5 cylinder + FO_1_2_4_5_3 = 6, + + // 6 cylinder + FO_1_5_3_6_2_4 = 4, + FO_1_4_2_5_3_6 = 7, + FO_1_2_3_4_5_6 = 9, + FO_1_6_3_2_5_4 = 13, // EG33 + + // todo: one day we shall support 7 cylinder radial, probably not before one actually approaches us + + // 8 cylinder + FO_1_8_4_3_6_5_7_2 = 5, + FO_1_8_7_2_6_5_4_3 = 11, + FO_1_5_4_2_6_3_7_8 = 12, + FO_1_2_7_8_4_5_6_3 = 19, + FO_1_3_7_2_6_5_4_8 = 20, // Ford 5.0 HO and 351W + + // 9 cylinder - for instance radial :) + // PS: Matt says that 9cyl is actually 1-3-5-7-9-2-4-6-8 or 1-8-6-4-2-9-7-5-3 for reverse rotation + FO_1_2_3_4_5_6_7_8_9 = 21, + + // 10 cylinder + FO_1_10_9_4_3_6_5_8_7_2 = 14, // dodge and viper ram v10 + + // 12 cylinder + FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 & M73 etc + FO_1_7_4_10_2_8_6_12_3_9_5_11 = 16, // lamborghini, typical rusEfi use-case + FO_1_12_5_8_3_10_6_7_2_11_4_9 = 18, // VAG W12 + FO_1_2_3_4_5_6_7_8_9_10_11_12 = 23, // mostly for hardware testing purposes + + + // 16 cylinder + // unfortunately not supported by default firmware because INJECTION_PIN_COUNT=IGNITION_PIN_COUNT=12 by default + FO_1_14_9_4_7_12_15_6_13_8_3_16_11_2_5_10 = 22, // WR16 + + // max used = 24 + + Force_4b_firing_order = ENUM_32_BITS, +} firing_order_e; diff --git a/firmware/tunerstudio/cache/frankenso/firing_order.h b/firmware/tunerstudio/cache/frankenso/firing_order.h index e69de29bb2..51fe262d27 100644 --- a/firmware/tunerstudio/cache/frankenso/firing_order.h +++ b/firmware/tunerstudio/cache/frankenso/firing_order.h @@ -0,0 +1,69 @@ +/* + * @file firing_order.h + * + * See also FiringOrderTSLogic.java + * + * @date Jul 20, 2016 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#include "rusefi_enums.h" + +#pragma once + +typedef enum { + FO_1 = 0, + + // 2 cylinder + FO_1_2 = 8, + + // 3 cylinder + FO_1_2_3 = 10, + FO_1_3_2 = 24, + + // 4 cylinder + FO_1_3_4_2 = 1, // typical inline 4 + FO_1_2_4_3 = 2, + FO_1_3_2_4 = 3, // for example horizontally opposed engine + FO_1_4_3_2 = 17, // for example VW aircooled boxer engine + + // 5 cylinder + FO_1_2_4_5_3 = 6, + + // 6 cylinder + FO_1_5_3_6_2_4 = 4, + FO_1_4_2_5_3_6 = 7, + FO_1_2_3_4_5_6 = 9, + FO_1_6_3_2_5_4 = 13, // EG33 + + // todo: one day we shall support 7 cylinder radial, probably not before one actually approaches us + + // 8 cylinder + FO_1_8_4_3_6_5_7_2 = 5, + FO_1_8_7_2_6_5_4_3 = 11, + FO_1_5_4_2_6_3_7_8 = 12, + FO_1_2_7_8_4_5_6_3 = 19, + FO_1_3_7_2_6_5_4_8 = 20, // Ford 5.0 HO and 351W + + // 9 cylinder - for instance radial :) + // PS: Matt says that 9cyl is actually 1-3-5-7-9-2-4-6-8 or 1-8-6-4-2-9-7-5-3 for reverse rotation + FO_1_2_3_4_5_6_7_8_9 = 21, + + // 10 cylinder + FO_1_10_9_4_3_6_5_8_7_2 = 14, // dodge and viper ram v10 + + // 12 cylinder + FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 & M73 etc + FO_1_7_4_10_2_8_6_12_3_9_5_11 = 16, // lamborghini, typical rusEfi use-case + FO_1_12_5_8_3_10_6_7_2_11_4_9 = 18, // VAG W12 + FO_1_2_3_4_5_6_7_8_9_10_11_12 = 23, // mostly for hardware testing purposes + + + // 16 cylinder + // unfortunately not supported by default firmware because INJECTION_PIN_COUNT=IGNITION_PIN_COUNT=12 by default + FO_1_14_9_4_7_12_15_6_13_8_3_16_11_2_5_10 = 22, // WR16 + + // max used = 24 + + Force_4b_firing_order = ENUM_32_BITS, +} firing_order_e; diff --git a/firmware/tunerstudio/cache/frankenso/frankenso_prefix.txt b/firmware/tunerstudio/cache/frankenso/frankenso_prefix.txt index e69de29bb2..793fc8ad25 100644 --- a/firmware/tunerstudio/cache/frankenso/frankenso_prefix.txt +++ b/firmware/tunerstudio/cache/frankenso/frankenso_prefix.txt @@ -0,0 +1,2 @@ + #define output_pin_e_enum "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","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","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","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","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + #define adc_channel_e_enum "Analog 3O","Analog 3L","Analog 3M","Analog 3J","Analog 3I","INVALID","Analog 3H","Analog 3G","INVALID","INVALID","INVALID","Analog 3P","Analog 3Q","Analog 3N","Analog VBatt","Analog 3E","NONE" diff --git a/firmware/tunerstudio/cache/frankenso/prepend.txt b/firmware/tunerstudio/cache/frankenso/prepend.txt index e69de29bb2..8b13789179 100644 --- a/firmware/tunerstudio/cache/frankenso/prepend.txt +++ b/firmware/tunerstudio/cache/frankenso/prepend.txt @@ -0,0 +1 @@ + diff --git a/firmware/tunerstudio/cache/frankenso/rusefi.input b/firmware/tunerstudio/cache/frankenso/rusefi.input index e69de29bb2..2482f2ad11 100644 --- a/firmware/tunerstudio/cache/frankenso/rusefi.input +++ b/firmware/tunerstudio/cache/frankenso/rusefi.input @@ -0,0 +1,3186 @@ +; This is a TunerStudio project for the RusEFI.com engine management system +; +; This file has been generated by invoking gen_config.bat. +; The input files are +; rusefi.input the common template +; rusefi_config.txt the project specific file +; +; In TunerStudio some fields have little question mark on the left of the name for additional field tips. +; Those tips are defined in ../integration/rusefi_config.txt +; +; For example +; +; float bias_resistor;+Pull-up resistor value on your board;"Ohm" +; here 'bias_resistor' is internal field name and the text between semicolons is what produces the tooltip +; Note that '+' sign is required after first semicolon for tooltop to appear in TunerStudio +; +; +; field = "# blue text" +; field = "! red text" +; field = "normal text" +; +; + +; this should stop TS from looking for the CAN ID in the 2nd byte location and allow the page reads to work correctly. +enable2ndByteCanID = false + +;#unset tuneByMAF + +[SettingGroups] + ; the referenceName will over-ride previous, so if you are creating a + ; settingGroup with a reference name of lambdaSensor, it will replace the + ; setting group defined in the settingGroups.xml of the TunerStudio config + ; folder. If is is an undefined referenceName, it will be added. + ; keyword = referenceName, DisplayName + + settingGroup = tuneVeMode, "VE Autotune Mode" + settingOption = tuneByTPS, "TPS-Based (See Injection -> Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/frankenso/rusefi_config.txt b/firmware/tunerstudio/cache/frankenso/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/frankenso/rusefi_config.txt +++ b/firmware/tunerstudio/cache/frankenso/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/kinetis/rusefi_config.txt b/firmware/tunerstudio/cache/kinetis/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/kinetis/rusefi_config.txt +++ b/firmware/tunerstudio/cache/kinetis/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/microrusefi/rusefi_config.txt b/firmware/tunerstudio/cache/microrusefi/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/microrusefi/rusefi_config.txt +++ b/firmware/tunerstudio/cache/microrusefi/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/prometheus/rusefi_config.txt b/firmware/tunerstudio/cache/prometheus/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/prometheus/rusefi_config.txt +++ b/firmware/tunerstudio/cache/prometheus/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/proteus/rusefi_config.txt b/firmware/tunerstudio/cache/proteus/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/proteus/rusefi_config.txt +++ b/firmware/tunerstudio/cache/proteus/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM Inj.Settings)" + settingOption = tuneByMAF, "MAF-Based" + settingOption = tuneByLoad, "Load-Based (Default)" + +; settingGroup = fAlgorithmSetting, "Fuel Logic / Tables" +; settingOption = FA_PLAIN_MAF, "Plain MAF" +; settingOption = FA_TPS, "AlphaN/TPS" +; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. + + +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ + +[TunerStudio] + queryCommand = "S" + versionInfo = "V" ; firmwave version for title bar. + signature = @@TS_SIGNATURE@@ ; signature is expected to be 7 or more characters. + +[Constants] +; new packet serial format with CRC + messageEnvelopeFormat = msEnvelope_1.0 + + endianness = little + nPages = 1 + + + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" + ; todo: make this command shorter one day, no need to have all these zeros + crc32CheckCommand = "k\x00\x00\x00\x00\x00\x00" + retrieveConfigError = "e" + +;communication settings + pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ +;e.g. put writeblocks off and add an interwrite delay + writeBlocks = on + interWriteDelay = 10 + blockReadTimeout = 3000; Milliseconds general timeout + + ; delayAfterPortOpen = 500 + + blockingFactor = 256 ; max chunk size +;end communication settings + + ; name = bits, type, offset, bits + ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits + ; name = scalar, type, offset, units, scale, translate, lo, hi, digits + +; see PAGE_0_SIZE in C source code +; CONFIG_DEFINITION_START + +; this section will be generated automatically by ConfigDefinition.jar based on rusefi_config.txt + +; CONFIG_DEFINITION_END + idleRpmPid_offset = "Constant base value" + idleRpmPid_periodMs = "PID recalculation period" + + +[Tuning] + spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators. + cursorDepth = 2 ; Same as spot depth. + + gaugeColumns = 1 ; Only 1 or 2 are valid. + + pageButtons = "&EGO" + gauge1 = RPMGauge + gauge2 = afr1Gauge + gauge3 = MAPGauge + gauge4 = veValueGauge + + +[LoggerDefinition] + ; valid logger types: composite, tooth, trigger, csv +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite + startCommand = "l\x01" + stopCommand = "l\x02" + dataReadCommand = "L" + dataReadTimeout = 10000 ; time in ms + dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ + +;tooth + ; recordDef = headerLen, footerLen, recordLen +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; uint16 that stores 1/100 second +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + +[VeAnalyze] + + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition +#if tuneByMAF + veAnalyzeMap = fuelTableMAFTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#else + veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 } +#endif + lambdaTargetTables = afrTableTbl, afrTSCustom + + ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable + filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true + + filter = deltaTps, "dTPS", deltaTps > , 50, , true + + filter = VBatt, "VBatt", VBatt < , 12, , true + + filter = minTps, "Minimum TPS", TPSValue, < , 1, , true + + +;[VeAnalyze] +; fuelAnalyzeMap = fuelTableTbl, afrTableTbl, AFRValue, egoCorrection , { 1 } +; filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true + + + +[OutputChannels] + + ochGetCommand = "O%2o%2c" + +; see TS_OUTPUT_SIZE in console source code + ochBlockSize = @@TS_OUTPUT_SIZE@@ + +; +; see TunerStudioOutputChannels struct +; + +; Bit flags + hasSdCard = bits, U32, 0, [0:0], "true", "false"; + isIgnitionEnabledIndicator=bits,U32, 0, [1:1], "true", "false"; + ind_injection_enabled=bits,U32, 0, [2:2], "true", "false"; + isCylinderCleanupEnabled=bits,U32, 0, [3:3], "true", "false"; + isCylinderCleanupActivated=bits,U32, 0, [4:4], "true", "false"; + ind_fuel_pump = bits, U32, 0, [5:5], "true", "false"; + ind_fan = bits, U32, 0, [6:6], "true", "false"; + ind_o2_heater = bits, U32, 0, [7:7], "true", "false"; + ind_check_engine= bits, U32, 0, [8:8], "true", "false"; + needBurn = bits, U32, 0, [9:9], "true", "false"; + ind_2nd_trigger_en=bits, U32, 0, [10:10], "true", "false"; + clutchUpState =bits, U32, 0, [11:11], "true", "false"; + clutchDownState =bits, U32, 0, [12:12], "true", "false"; + knockEverIndicator=bits, U32, 0, [13:13], "true", "false"; + knockNowIndicator=bits, U32, 0, [14:14], "true", "false"; + brakePedalIndicator=bits, U32, 0, [15:15], "true", "false"; + toothLogReady =bits, U32, 0, [16:16], "true", "false"; + acSwitchIndicator =bits, U32, 0, [17:17], "true", "false"; + ind_tps_error = bits, U32, 0, [18:18], "true", "false"; + ind_clt_error = bits, U32, 0, [19:19], "true", "false"; +; not implemented +; ind_map_error = bits, U32, 0, [20:20], "true", "false"; + + ind_iat_error = bits, U32, 0, [21:21], "true", "false"; + ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; + ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; + ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; + +; RPM, vss + RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 + rpmAcceleration = scalar, S16, 6, "dRpm",{1/@@PACK_MULT_PERCENT@@}, 0 + speedToRpmRatio = scalar, S16, 8, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + vehicleSpeedKph = scalar, U08, 10, "kph", 1, 0.0 + +; temperatures + internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 + coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 +; todo: aux1 +; todo: aux2 + + +; throttle, pedal + TPSValue = scalar, S16, 20, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + throttlePedalPosition = scalar,S16, 22, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsADC = scalar, U16, 24, "ADC", 1, 0.0; + +; air flow/mass measurments + MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 + MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0 + engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm + +; misc sensors + VBatt = scalar, U16, 38, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0.0 + oilPressure = scalar, U16, 40, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 + vvtPosition = scalar, U16, 42, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + + ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) + ;tpsADC2 = scalar, U16, 44, "ADC", 1, 0.0; + +; fuel math + chargeAirMass = scalar, U16, 44, "g",0.001, 0 + crankingFuelMs = scalar, U16, 46, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + currentTargetAfr= scalar, U16, 48, "ratio",,{1/@@PACK_MULT_AFR@@},, 0 + baseFuel = scalar, U16, 50, "ms",{1/@@PACK_MULT_MS@@}, 0 + fuelRunning = scalar, U16, 52, "ms",{1/@@PACK_MULT_MS@@}, 0 + actualLastInjection=scalar,U16, 54, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 + veValue = scalar, U08, 57, "ratio", 0.5, 0 + injectionOffset = scalar, S16, 58, "deg",{1/@@PACK_MULT_ANGLE@@}, 0 + tCharge = scalar, U16, 60, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + +; Corrections + injectorLagMs = scalar, U16, 62, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + iatCorrection = scalar, S16, 64, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + cltCorrection = scalar, S16, 66, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + baroCorrection = scalar, S16, 68, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelPidCorrection=scalar, S16, 70, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Wall model AE + wallFuelAmount = scalar, U16, 72, "ms",{1/@@PACK_MULT_MS@@}, 0 + wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 + +; TPS/load AE + engineLoadDelta = scalar, S16, 76, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + deltaTps = scalar, S16, 78, "ratio",{1/@@PACK_MULT_PERCENT@@}, 0 + engineLoadAccelExtra=scalar,S16, 80, "value",{1/@@PACK_MULT_PERCENT@@}, 0 + tpsAccelFuel = scalar, U16, 82, "ms",{1/@@PACK_MULT_MS@@}, 0 + +; Ignition + ignitionAdvance = scalar, S16, 84, "deg",{1/@@PACK_MULT_ANGLE@@}, 0.0 + sparkDwellValue = scalar, U16, 86, "ms",{1/@@PACK_MULT_MS@@}, 0.0 + coilDutyCycle = scalar, S16, 88, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Idle & ETB + idleAirValvePosition=scalar,S16, 90, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etbTarget = scalar, S16, 92, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1DutyCycle = scalar, S16, 94, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + etb1Error = scalar, S16, 96, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + +; Fuel system + fuelTankLevel = scalar, S16, 98, "amount",{1/@@PACK_MULT_PERCENT@@}, 0 + fuelConsumptionPerHour=scalar,F32, 100, "kPa", 1, 0.0 + +; Knock + knockCount = scalar, U32, 104,"counter", 1, 0 + knockLevel = scalar, F32, 108, "Volts", 1, 0 + +; Mode, firmware, protocol, run time +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 + engineMode = scalar, U32, 116, "em", 1, 0.0; + firmwareVersion = scalar, U32, 120,"version_f", 1, 0 + + +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 + +; Errors + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 + +; Debug + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 + +; Accel + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 + +; egt + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + + ; we use this to match logs to tunes + tuneCrc16= scalar, U16, 240, "crc16", 1, 0 + +; +; see TunerStudioOutputChannels struct +; + +; todo: generate this section programatically + LM_PLAIN_MAF = {0}, + LM_ALPHA_N = {1}, + LM_SPEED_DENSITY = {3}, + LM_REAL_MAF = {4} + + egoCorrection = { 100 } + time = { timeNow } +; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + +[PcVariables] + tuneCrcPcVariable = continuousChannelValue, tuneCrc16 + + wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; + wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 + +; These are inverted (false = "Yes") so that they default to enabled + enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" + enableLogErrorList = bits, U08, [0:0], "Yes", "No" + +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "VVT Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "VVT Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "", "di5", "di5", "di5", "di5", "S di5" "", "" + +[ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; + defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + ; TPS 1 Primary + maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + + ; TPS 1 Secondary + maintainConstantValue = tps1SecondaryMax, { (calibrationMode == 6 ) ? calibrationValue : tps1SecondaryMax } + maintainConstantValue = tps1SecondaryMin, { (calibrationMode == 7 ) ? calibrationValue : tps1SecondaryMin } + + ; ETB Auto Gain Calibration + maintainConstantValue = etb_pFactor, { (calibrationMode == 3 ) ? calibrationValue : etb_pFactor } + maintainConstantValue = etb_iFactor, { (calibrationMode == 4 ) ? calibrationValue : etb_iFactor } + maintainConstantValue = etb_dFactor, { (calibrationMode == 5 ) ? calibrationValue : etb_dFactor } + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + +[CurveEditor] +; xAxis = leftValue, rightValue, step +; yAxis = bottomValue, topValue, step + + + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, RPMValue + yBins = knockNoise + gauge = RPMGauge + + curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + columnLabel = "Voltage", "AFR" + xAxis = 0, 6, 10 + yAxis = 0, 28, 10 + xBins = narrowToWideOxygenBins + yBins = narrowToWideOxygen + gauge = afr1Gauge + + curve = fsioCurve1, "FSIO Curve #1" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -155, 150, 10 + xBins = fsioCurve1Bins + yBins = fsioCurve1 + + curve = fsioCurve2, "FSIO Curve #2" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -150, 150, 10 + xBins = fsioCurve2Bins + yBins = fsioCurve2 + + curve = fsioCurve3, "FSIO Curve #3" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve3Bins + yBins = fsioCurve3 + + curve = fsioCurve4, "FSIO Curve #4" + columnLabel = "X", "Y" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = fsioCurve4Bins + yBins = fsioCurve4 + + curve = mapAccelTaper, "Engine Load Acceleration Enrichment Taper" + columnLabel = "Distance", "Multiplier" + xAxis = 0, 128, 10 + yAxis = -5, 5, 10 + xBins = mapAccelTaperBins + yBins = mapAccelTaperMult + + curve = dwellCorrection, "Dwell time RPM based" + columnLabel = "RPM", "Dwell" + xAxis = 0, 8000, 10 + yAxis = 0, 30, 10 + xBins = sparkDwellRpmBins, RPMValue + yBins = sparkDwellValues + gauge = RPMGauge + + curve = map_samplingAngleCurve, "MAP Sampling Start Angle" + columnLabel = "RPM", "Angle" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingAngleBins, RPMValue + yBins = map_samplingAngle + gauge = MAPGauge + + curve = map_samplingWindowCurve, "MAP Sampling Duration" + columnLabel = "RPM", "Window" + xAxis = 0, 8000, 10 + yAxis = 0, 180, 10 + xBins = map_samplingWindowBins, RPMValue + yBins = map_samplingWindow + gauge = MAPGauge + + curve = injectorsDeadTime, "Injector Dead Time by VBatt" + columnLabel = "Voltage", "Dead Time" + xAxis = 8, 21, 10 + yAxis = -3, 3, 10 + xBins = injector_battLagCorrBins, VBatt + yBins = injector_battLagCorr + gauge = VBattGauge + + curve = mafDecodingCurve, "MAF sensor" + columnLabel = "Voltage", "kg/hour" + xAxis = -1, 6, 10 + yAxis = -30, 1300, 10 + xBins = mafDecodingBins, MAFValue + yBins = mafDecoding + gauge = MAFGauge + + curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 2, 11 + xBins = iatFuelCorrBins, intake + yBins = iatFuelCorr + gauge = IATGauge + + curve = cltTimingCorrCurve, "Warmup timing correction" + columnLabel = "Coolant", "Extra" + xAxis = -40, 120, 10 + yAxis = 0, 50, 10 + xBins = cltTimingBins, coolant + yBins = cltTimingExtra + gauge = CLTGauge + + curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + gauge = CLTGauge + + curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingFuelBins, coolant + yBins = crankingFuelCoef + gauge = CLTGauge + + curve = etbTpsBiasCurve, "Electronic TB Bias Curve" + columnLabel = "TPS", "duty bias" + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 + xBins = etbBiasBins, TPSValue + yBins = etbBiasValues + gauge = TPSGauge + + curve = crankingTpsCurve, "Cranking TPS Multiplier" + columnLabel = "TPS", "Multiplier" + xAxis = 0, 100, 10 + yAxis = 0, 3, 10 + xBins = crankingTpsBins, TPSValue + yBins = crankingTpsCoef + gauge = TPSGauge + + curve = crankingDurationCurve, "Cranking Duration Multiplier" + columnLabel = "Engine Cycle", "Multiplier" + xAxis = 0, 1000, 10 + yAxis = 0, 3, 10 + xBins = crankingCycleBins + yBins = crankingCycleCoef + + + curve = cltIdleCurve, "Warmup Idle multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltIdleCorrBins, coolant + yBins = cltIdleCorr + gauge = CLTGauge + + curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 100, 10 + xBins = iacCoastingBins, coolant + yBins = iacCoasting + gauge = idleAirValvePositionGauge + + curve = cltCrankingCurve, "Cranking Idle Air multiplier" + columnLabel = "Coolant", "Multiplier" + xAxis = -40, 120, 10 + yAxis = 0, 3, 10 + xBins = cltCrankingCorrBins, coolant + yBins = cltCrankingCorr + gauge = CLTGauge + + curve = cltIdleRPMCurve, "Idle Target RPM" + columnLabel = "Coolant", "RPM" + xAxis = -40, 120, 10 + yAxis = 0, 8000, 10 + xBins = cltIdleRpmBins, coolant + yBins = cltIdleRpm, RPMValue + gauge = CLTGauge + + curve = idleAdvanceCurve, "Idle Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = idleAdvanceBins, RPMValue + yBins = idleAdvance + gauge = RPMGauge + + curve = idleVeCurve, "Idle VE" + columnLabel = "RPM", "%" + xAxis = 0, 8000, 10 + yAxis = 0, 250, 10 + xBins = idleVeBins, RPMValue + yBins = idleVe + gauge = afr1Gauge + + curve = crankingAdvanceCurve, "Cranking Advance Angle" + columnLabel = "RPM", "degrees" + xAxis = 0, 8000, 10 + yAxis = -100, 100, 10 + xBins = crankingAdvanceBins, RPMValue + yBins = crankingAdvance + gauge = RPMGauge + + curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" + columnLabel = "Coolant", "AFR Offset" + xAxis = -40, 200, 9 + yAxis = -3, 1, 5 + xBins = cltFuelCorrBins, coolant + yBins = wueAfrTargetOffset + gauge = cltGauge + + curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" + columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" + xAxis = -40, 200, 9 + yAxis = 90, 500, 6 + xBins = cltFuelCorrBins, coolant + yBins = cltFuelCorr + yBins = wueAnalRecommend + ;gauge = cltGauge + + lineLabel = "Warmup Correction" + lineLabel = "Recommended WUE" + +[TableEditor] + ; table_id, map3d_id, "title", page + + table = fuelTableMAFTbl, fuelTableMAFMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, MAFValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableTPSTbl, fuelTableTPSMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, TPSValue + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = fuelTableELTbl, fuelTableELMap, "Fuel Table", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = fuelRpmBins, RPMValue + yBins = fuelLoadBins, engineLoad + zBins = fuelTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + +; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS + table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1 + topicHelp = "tpstpsHelp" + xBins = tpsTpsAccelFromRpmBins, TPSValue + yBins = tpsTpsAccelToRpmBins, TPSValue + zBins = tpsTpsAccelTable + + table = boostTableTbl, boostMapOpen, "Boost Open", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableOpenLoop + + table = boostTable2Tbl, boostMapClosed, "Boost Closed", 1 + xBins = boostRpmBins, RPMValue + yBins = boostTpsBins, TPSValue + zBins = boostTableClosedLoop + + + + table = fsioTable1Tbl, fsioTable1Map, "FSIO Table #1", 1 + xBins = fsioTable1RpmBins, RPMValue + yBins = fsioTable1LoadBins, engineLoad + zBins = fsioTable1 + + table = fsioTable2Tbl, fsioTable2Map, "FSIO Table #2", 1 + xBins = fsioTable2RpmBins, RPMValue + yBins = fsioTable2LoadBins, engineLoad + zBins = fsioTable2 + + table = fsioTable3Tbl, fsioTable3Map, "FSIO Table #3", 1 + xBins = fsioTable3RpmBins, RPMValue + yBins = fsioTable3LoadBins, engineLoad + zBins = fsioTable3 + + table = fsioTable4Tbl, fsioTable4Map, "FSIO Table #4", 1 + xBins = fsioTable4RpmBins, RPMValue + yBins = fsioTable4LoadBins, engineLoad + zBins = fsioTable4 + + table = baroCorrTbl, baroCorrMap, "Baro Correction", 1 + ; constant, variable + xBins = baroCorrRpmBins, RPMValue + yBins = baroCorrPressureBins, baroPressure + zBins = baroCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1 + ; constant, variable + xBins = ignitionRpmBins, RPMValue +#if FA_PLAIN_MAF + yBins = ignitionLoadBins, MAFValue +#elif FA_TPS + yBins = ignitionLoadBins, TPSValue +#else + yBins = ignitionLoadBins, engineLoad +#endif + + zBins = ignitionTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionTpsTableTbl, ignitionTableMap, "Ignition TPS Table", 1 + ; constant, variable + ; Currently we share ignitionRpmBins between two advance tables... Is it ok? + xBins = ignitionRpmBins, RPMValue + yBins = ignitionTpsBins, TPSValue + + zBins = ignitionTpsTable + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = ignitionIatCorrTableTbl, ignitionIatCorrTableMap, "Ignition Intake Air Temp correction", 1 + ; constant, variable + xBins = ignitionIatCorrRpmBins, RPMValue + yBins = ignitionIatCorrLoadBins, intake + zBins = ignitionIatCorrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = veTableTbl, veTableMap, "VE Table", 1 + ; constant, variable + xBins = veRpmBins, RPMValue +#if tuneByTPS + yBins = ignitionTpsBins, TPSValue +#else + yBins = veLoadBins, MAPValue +#endif + zBins = veTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + + table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1 + topicHelp = "fuelHelp" + ; constant, variable + xBins = injPhaseRpmBins, RPMValue + yBins = injPhaseLoadBins, engineLoad + zBins = injectionPhase +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 + ; constant, variable + xBins = pedalToTpsRpmBins, RPMValue + yBins = pedalToTpsPedalBins, throttlePedalPosition + zBins = pedalToTpsTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + + table = afrTableTbl, afrTableMap, "Target AFR Table", 1 + ; constant, variable + xBins = afrRpmBins, RPMValue + yBins = afrLoadBins, MAPValue + zBins = afrTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(RICHER)", "(LEANER)" + + table = iacPidMultTbl, iacPidMultMap, "IAC PID Multiplier Table", 1 + ; constant, variable + xBins = iacPidMultRpmBins, RPMValue + yBins = iacPidMultLoadBins, engineLoad + zBins = iacPidMultTable +; gridHeight = 2.0 + gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. + upDownLabel = "(Later)", "(Sooner)" + + table = gppwm1Tbl, gppwm1Map, "GP#1", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "GP#2", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "GP#3", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "GP#4", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + +[GaugeConfigurations] + +gaugeCategory = Sensors - Extra 2 + egt1Gauge = egt1, "EGT#1", "C", 0, 2000 + egt2Gauge = egt2, "EGT#2", "C", 0, 2000 + egt3Gauge = egt3, "EGT#3", "C", 0, 2000 + egt4Gauge = egt4, "EGT#4", "C", 0, 2000 + egt5Gauge = egt5, "EGT#5", "C", 0, 2000 + egt6Gauge = egt6, "EGT#6", "C", 0, 2000 + egt7Gauge = egt7, "EGT#7", "C", 0, 2000 + egt8Gauge = egt8, "EGT#8", "C", 0, 2000 + rpmAccelerationGa = rpmAcceleration, "rpm delta", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1 + knockCountGauge = knockCount,"Knock count", "count", 0, 120, 10, 10, 100, 100, 1, 1 + knockLevelGauge = knockLevel,"Knock level", "volts", 0, 7, 10, 10, 100, 100, 1, 2 + fuelTankLevelGauge = fuelTankLevel,"Fuel level", "x", 0, 7, 10, 10, 100, 100, 1, 2 + speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4 + +gaugeCategory = ECU Status + warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 + lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode3Gauge = recentErrorCode3, "Error#4", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode4Gauge = recentErrorCode4, "Error#5", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode5Gauge = recentErrorCode5, "Error#6", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 + firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Debug + debugF1Gauge = debugFloatField1, {bitStringValue( debugFieldF1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF2Gauge = debugFloatField2, {bitStringValue( debugFieldF2List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF3Gauge = debugFloatField3, {bitStringValue( debugFieldF3List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF4Gauge = debugFloatField4, {bitStringValue( debugFieldF4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF5Gauge = debugFloatField5, {bitStringValue( debugFieldF5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugF6Gauge = debugFloatField6, {bitStringValue( debugFieldF6List, debugMode )}, "", -100, 100, 0, 0, 100, 100, 4, 4 + debugF7Gauge = debugFloatField7, {bitStringValue( debugFieldF7List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 4, 4 + debugI1Gauge = debugIntField1, {bitStringValue( debugFieldI1List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI2Gauge = debugIntField2, {bitStringValue( debugFieldI2List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI3Gauge = debugIntField3, {bitStringValue( debugFieldI3List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI4Gauge = debugIntField4, {bitStringValue( debugFieldI4List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + debugI5Gauge = debugIntField5, {bitStringValue( debugFieldI5List, debugMode )}, "", 0, 100, 0, 0, 100, 100, 0, 0 + + +gaugeCategory = Sensors - Basic + RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 + CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 + MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 + VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 + MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 + massAirFlowValueGa = massAirFlowValue,"Mass air flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1 + + +gaugeCategory = Sensors - Extra 1 + VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + atmPresCGauge = baroPressure, @@GAUGE_NAME_BARO_PRESSURE@@, "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 + vvtPositionGauge = vvtPosition, @@GAUGE_NAME_VVT@@, "deg", 0, 100, 0, 0, 720, 720, 0, 0 + internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 + OilPressGauge = oilPressure, "Oil Pressure", "kPa", 0, 750, 35, 75, 550, 700, 0, 0 + idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + +gaugeCategory = Ignition + ignadvGauge = ignitionAdvance, "Ignition timing", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 + coilDutyCycleGauge = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, "perc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 + +gaugeCategory = Acceleration Enrichment + engineLoadDeltaGauge = engineLoadDelta,"AE: load change","value", 0, 120, 10, 10, 100, 100, 1, 1 + engineLoadAccelExtraGauge = engineLoadAccelExtra,"AE: load extra","value", 0, 120, 10, 10, 100, 100, 1, 1 + deltaTpsGauge = deltaTps, "AE: TPS change", "", 0, 120, 10, 10, 100, 100, 1, 1 + tpsAccelFuelGauge = tpsAccelFuel,"AE: TPS enrich", "ms", 0, 120, 10, 10, 100, 100, 1, 1 + wallFuelAmountGauge = wallFuelAmount, "AE: wall amount", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + wallFuelCorrectionGauge = wallFuelCorrection, "AE: wall correction extra", "ms", 0, 100, 0, 0, 100, 100, 0, 0 + +gaugeCategory = Fueling + ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld + tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 + baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 + crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + cltCorrectionGauge = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 + injectorDutyCycleGauge=injectorDutyCycle, @@GAUGE_NAME_FUEL_INJ_DUTY@@,"%", 0, 120, 10, 10, 100, 100, 1, 1 + actualLastInjectionGauge = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + veValueGauge = veValue, "fuel: VE", "", 0, 120, 10, 10, 100, 100, 1, 1 + + injectorLagMsGauge = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelRunningGauge = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + baseFuelGauge = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, @@GAUGE_NAME_FUEL_PID_CORR@@, "%", -10, 10, -8, -5, 5, 8, 3, 1 + +gaugeCategory = Throttle Body (incl. ETB) + pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1 + tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 + TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 + TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1 + + etbTargetGauge = etbTarget, @@GAUGE_NAME_ETB_TARGET@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 + etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 + etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 + +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + +[WueAnalyze] + +; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition + wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection + + lambdaTargetTables = afrTableTbl, afrTSCustom + + wuePercentOffset = 0 ; for working with 0 based enrichment set to 100 + option = disableLiveUpdates + option = burnOnSend + +; filter = std_DeadLambda ; Auto build + + filter = decelFilterMap,"After Start Enrich", engine, & , 4 , , false + filter = accelFilterTp, "TP Accel Enrich" , engine, & , 16, , false + filter = decelFilterTp, "TP Decel Enrich" , engine, & , 32, , false + filter = accelFilterMap,"MAP Accel Enrich" , engine, & , 64, , false + filter = decelFilterMap,"MAP Decel Enrich" , engine, & , 128, , false + ; this works, just another way to skin a cat + ;filter = decelFilter, "Decel Flag" , tpsaccden, > , 0, , false + filter = overrunFilter, "Overrun" , pulseWidth1, = , 0, , false + filter = highThrottle, "High Throttle" , throttle, > , 15, , true + filter = lowRpm, "Low RPM" , rpm, < , 300, , false + filter = std_Custom ; Standard Custom Expression Filter. + + +[FrontPage] + ; Gauges are numbered left to right, top to bottom. + ; + ; 1 2 3 4 + ; 5 6 7 8 + + gauge1 = RPMGauge + gauge2 = CLTGauge + gauge3 = TPSGauge + gauge4 = MAPGauge + gauge5 = afr1Gauge + gauge6 = VBattGauge + gauge7 = dwellGauge + gauge8 = ignadvGauge + + + +; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg + ; important status + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black + + ; minor info + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black + indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black + indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black + indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black + indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black + indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white + + ; error codes + indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black + indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black + indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black + +; not implemented +; indicator = { ind_map_error}, "map", "map error", white, black, red, black + + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black + + indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black + indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black + + +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + +[Datalog] + ; Channel Label Type Format + entry = time, @@GAUGE_NAME_TIME@@, float, "%.3f" + entry = RPMValue, @@GAUGE_NAME_RPM@@, int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" + entry = coolant, @@GAUGE_NAME_CLT@@, float, "%.2f" + entry = intake, @@GAUGE_NAME_IAT@@, float, "%.2f" + entry = oilPressure, "Oil Press", float, "%.1f" + entry = TPSValue, @@GAUGE_NAME_TPS@@, float, "%.2f" + entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" + entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" + entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = knockCount, @@GAUGE_NAME_KNOCK_COUNTER@@, int, "%d" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = speedToRpmRatio, "s2rpm", float, "%.3f" + entry = rpmAcceleration, "dRPM", float, "%.3f" + entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" + entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" + entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" + entry = totalTriggerErrorCounter, @@GAUGE_NAME_TRG_ERR@@,int, "%d" + entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" + + + entry = injectorLagMs, @@GAUGE_NAME_INJECTOR_LAG@@, float, "%.3f" + entry = fuelRunning, @@GAUGE_NAME_FUEL_RUNNING@@, float, "%.3f" + entry = actualLastInjection, @@GAUGE_NAME_FUEL_LAST_INJECTION@@, float, "%.3f" + entry = baseFuel, @@GAUGE_NAME_FUEL_BASE@@, float, "%.2f" + entry = fuelPidCorrection,@@GAUGE_NAME_FUEL_PID_CORR@@, float, "%.2f" + entry = veValue, @@GAUGE_NAME_FUEL_VE@@, float, "%.3f" + entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" + entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" + entry = currentTargetAfr,@@GAUGE_NAME_TARGET_AFR@@, float,"%.3f" + + entry = accelerationX, @@GAUGE_NAME_ACCEL_X@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, float,"%.2f", { LIS302DLCsPin != 0 } + entry = egt1, "EGT1", float,"%.1f", { max31855_cs1 != 0} + entry = egt2, "EGT2", float,"%.1f", { max31855_cs2 != 0} + entry = egt3, "EGT3", float,"%.1f", { max31855_cs3 != 0} + entry = egt4, "EGT4", float,"%.1f", { max31855_cs4 != 0} + entry = egt5, "EGT5", float,"%.1f", { max31855_cs5 != 0} + entry = egt6, "EGT6", float,"%.1f", { max31855_cs6 != 0} + entry = egt7, "EGT7", float,"%.1f", { max31855_cs7 != 0} + entry = egt8, "EGT8", float,"%.1f", { max31855_cs8 != 0} + + entry = engineLoadAccelExtra, @@GAUGE_NAME_FUEL_EL_EXTRA@@,float, "%.3f" + entry = engineLoadDelta, "fuel: load change",float, "%.3f" + + entry = deltaTps, @@GAUGE_NAME_FUEL_TPS_ROC@@,float, "%.3f" + entry = tpsAccelFuel, @@GAUGE_NAME_FUEL_TPS_EXTRA@@, float, "%.3f" + + entry = wallFuelCorrection,@@GAUGE_NAME_FUEL_WALL_CORRECTION@@, float, "%.3f" + entry = wallFuelAmount, @@GAUGE_NAME_FUEL_WALL_AMOUNT@@, float, "%.3f" + + entry = baroCorrection, @@GAUGE_NAME_FUEL_BARO_CORR@@,float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" + + entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" + entry = injectionOffset, "injOffset" , float, "%.2F" + +; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" +; Alternator_PID: alternator duty cycle +; DBG_TPS_ACCEL: from TPS + entry = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: current integration term +; DBG_TPS_ACCEL: to TPS + entry = debugFloatField2, @@GAUGE_NAME_DEBUG_F2@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: previous error +; DBG_TPS_ACCEL: tps<>tps table value + entry = debugFloatField3, @@GAUGE_NAME_DEBUG_F3@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: I setting +; DBG_TPS_ACCEL: extra fuel + entry = debugFloatField4, @@GAUGE_NAME_DEBUG_F4@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: D setting + entry = debugFloatField5, @@GAUGE_NAME_DEBUG_F5@@,float,"%.4f", { !enableLogDebugChannels } + +; Alternator_PID: dTerm + entry = debugFloatField6, @@GAUGE_NAME_DEBUG_F6@@,float,"%.4f", { !enableLogDebugChannels } + + entry = debugFloatField7, @@GAUGE_NAME_DEBUG_F7@@,float,"%.4f", { !enableLogDebugChannels } + + +; Alternator_PID: P setting + entry = debugIntField1, @@GAUGE_NAME_DEBUG_I1@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: offset setting + entry = debugIntField2, @@GAUGE_NAME_DEBUG_I2@@,int,"%d", { !enableLogDebugChannels } + +; Alternator_PID: PID reset counter + entry = debugIntField3, @@GAUGE_NAME_DEBUG_I3@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField4, @@GAUGE_NAME_DEBUG_I4@@,int,"%d", { !enableLogDebugChannels } + + entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + + + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = tuneCrc16, "Tune CRC16",int,"%d" + + entry = engineMode, "Engine Mode",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" + entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" + entry = recentErrorCode0, "error 0",int,"%d", { !enableLogErrorList } + entry = recentErrorCode1, "error 1",int,"%d", { !enableLogErrorList } + entry = recentErrorCode2, "error 2",int,"%d", { !enableLogErrorList } + entry = recentErrorCode3, "error 3",int,"%d", { !enableLogErrorList } + entry = recentErrorCode4, "error 4",int,"%d", { !enableLogErrorList } + entry = recentErrorCode5, "error 5",int,"%d", { !enableLogErrorList } + entry = recentErrorCode6, "error 6",int,"%d", { !enableLogErrorList } + entry = recentErrorCode7, "error 7",int,"%d", { !enableLogErrorList } + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" + + entry = tCharge, "tCharge",float,"%.3f" + + entry = clutchUpState, @@INDICATOR_NAME_CLUTCH_UP@@,int,"%d" + entry = clutchDownState, @@INDICATOR_NAME_CLUTCH_DOWN@@,int,"%d" + entry = brakePedalIndicator, @@INDICATOR_NAME_BRAKE_DOWN@@,int,"%d" + entry = acSwitchIndicator, @@INDICATOR_NAME_AC_SWITCH@@,int,"%d" + entry = ind_fan, "radiator fan",int,"%d" + +; Electronic throttle body + entry = etb1Error, "ETB Error", float, "%.3f" + entry = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, float, "%.3f" + entry = etbTarget, "ETB Target", float, "%.3f" + + +; tpsADC = U16, "ADC", +; alignmet = U16, "al", +; atmPres = F32, "pres", +; crankingFuel = F32, "ms", +; tCharge = F32, "T", +; sparkDwell = F32, "MAP", +; warmUpEnrich = F32, "%", + +[Menu] + +menuDialog = main + menu = "&Base &Engine" + subMenu = engineChars, "Base engine" + subMenu = triggerConfiguration, "Trigger" + subMenu = triggerConfiguration_IO, "Advanced Trigger" + subMenu = std_separator + subMenu = energySystems, "Battery and alternator" + subMenu = std_separator + + # Digital outputs + subMenu = mainRelayDialog, "Main relay" + subMenu = starterRelay, "Starter Disable relay" + subMenu = fuelPump, "Fuel pump & rail" + subMenu = fanSetting, "Fan" + subMenu = tachSettings, "Tachometer" + subMenu = malfunction, "Check engine light" + subMenu = statusLeds, "Status LEDs" + + menu = "Fuel" + # basic + subMenu = injectionSettings, "Injection settings" + subMenu = injectionDeadTime, "Injector dead time", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Targets & closed loop + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1} + subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Fuel table/VE + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} + subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Corrections + subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1} + subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1} + subMenu = baroCorrTbl, "Baro multiplier", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = tChargeSettings, "tCharge settings", 0, {isInjectionEnabled == 1} + subMenu = std_separator + + # Accel enrichment + subMenu = AccelEnrich, "Accel/decel enrichment/enleanment", 0, {isInjectionEnabled == 1} + subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1} + subMenu = mapAccelTaper, "Engine load AE taper", 0, {isInjectionEnabled == 1} + + + menu = "Ignition" + subMenu = ignitionSettings, "Ignition settings" + subMenu = std_separator + + subMenu = dwellSettings, "Dwell", 0, {isIgnitionEnabled == 1} + subMenu = ignitionCylExtra, "Ignition cylinder trim", 0, {isIgnitionEnabled == 1} + ; todo: once proven, uncomment and remove from the "broken" menu + ; subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = std_separator + + subMenu = ignitionTableTbl, "Ignition advance", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 0} + subMenu = ignitionTpsTableTbl, "Ignition advance (TPS)", 0, {isIgnitionEnabled == 1 && useTPSAdvanceTable == 1} + subMenu = std_separator + + # corrections + subMenu = cltTimingCorrCurve, "CLT correction", 0, {isIgnitionEnabled == 1} + subMenu = ignitionIatCorrTableTbl, "IAT correction", 0, {isIgnitionEnabled == 1} + + menu = "&Cranking" + subMenu = crankingDialog, "Cranking settings" + subMenu = std_separator + + subMenu = crankingCltCurve, "Fuel CLT multiplier" + subMenu = crankingDurationCurve, "Fuel duration multiplier" + subMenu = crankingTpsCurve, "Fuel TPS multiplier" + subMenu = std_separator + + subMenu = crankingAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForCranking == 1} + subMenu = std_separator + + subMenu = cltCrankingCurve, "IAC multiplier", 0, {overrideCrankingIacSetting == 1} + + menu = "&Idle" + subMenu = idleSettings, "Idle settings" + subMenu = idlehw, "Idle hardware" + subMenu = std_separator + subMenu = cltIdleRPMCurve, "Target RPM", 0, {idleMode == 0} + subMenu = iacPidMultTbl, "IAC PID Multiplier", 0, {idleMode == 0 && useIacPidMultTable == 1} + subMenu = std_separator + subMenu = idleVeCurve, "VE", 0, {useSeparateVeForIdle == 1} + subMenu = idleAdvanceCurve, "Ignition advance", 0, {useSeparateAdvanceForIdle == 1} + subMenu = std_separator + subMenu = idleTimingPidCorrDialog, "Closed-loop idle timing" + subMenu = cltIdleCurve, "CLT multiplier" + subMenu = iacCoastingCurve, "Coasting IAC Position for Auto-Idle", 0, {useIacTableForCoasting == 1} + + menu = "&Advanced" + subMenu = boostDialog, "Boost Control" + subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator + subMenu = fsioInputsDialog, "FSIO inputs" + subMenu = auxPidDialog, "Aux PID" + subMenu = fsioOutputsDialog, "FSIO outputs" + subMenu = fsioTable1Tbl, "FSIO Table #1" + subMenu = fsioTable2Tbl, "FSIO Table #2" + subMenu = fsioTable3Tbl, "FSIO Table #3" + subMenu = fsioTable4Tbl, "FSIO Table #4" + subMenu = fsioFormulas, "FSIO Formulas" + subMenu = fsioCurve1, "FSIO Curve #1" + subMenu = fsioCurve2, "FSIO Curve #2" + subMenu = fsioCurve3, "FSIO Curve #3" + subMenu = fsioCurve4, "FSIO Curve #4" + + menu = "&Sensors" + # Base analog input settings + subMenu = otherSensorInputs, "Misc sensors" + subMenu = analogInputSettings, "Analog input settings" + subMenu = std_separator + + # Thermistors + subMenu = cltSensor, "CLT sensor" + subMenu = iatSensor, "IAT sensor" + subMenu = auxTempSensor1Sensor, "AuxTemp1 sensor" + subMenu = auxTempSensor2Sensor, "AuxTemp2 sensor" + subMenu = std_separator + + # TPS/pedal + subMenu = tpsSensor, "TPS" + subMenu = pedalSensor, "Accelerator pedal" + subMenu = std_separator + + # MAP/Baro + subMenu = mapSettings, "MAP sensor" + subMenu = mapCurves, "MAP sampling" + subMenu = baroSettings, "Baro sensor" + subMenu = std_separator + + # MAF + subMenu = mafSettings, "MAF sensor" + subMenu = mafDecodingCurve, "MAF transfer function", 0, {mafAdcChannel != @@ADC_CHANNEL_NONE@@ } + subMenu = std_separator + + # O2 sensor(s) + subMenu = egoSettings, "EGO sensor" + subMenu = narrowToWideOxygenCurve, "Narrow to Wideband approximation" + subMenu = cj125Function, "CJ125 settings (wbo decoder)" @@if_ts_show_cj125 + subMenu = std_separator + + # Misc sensors + subMenu = speedSensor, "Vehicle speed sensor" + subMenu = oilPressureSensor, "Oil pressure" + subMenu = egtInputs, "EGT" @@if_ts_show_egt + + menu = "&Controller" + subMenu = ecuStimulator, "ECU stimulator" + subMenu = datalogSettings, "Datalogging" + subMenu = ioTest, "Bench test" + subMenu = engineTypeDialog, "Popular vehicles" + subMenu = std_separator + + subMenu = lcdScreen, "LCD" @@if_ts_show_lcd + subMenu = joystickPanel, "Joystick" @@if_ts_show_joystick + subMenu = spiFunction, "SPI"@@if_ts_show_spi + subMenu = monitoringSettings, "rusEfi console" + subMenu = std_separator + + subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + + subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout + subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout + subMenu = allPins3_1_and_2 "Full pinout 3/3" @@if_ts_show_full_pinout + subMenu = std_separator + + + # EXPERIMENTAL FEATURES + subMenu = parkingLot, "Experimental/Broken" + subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" + subMenu = std_separator + + subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 + subMenu = std_separator + + subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb + subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb + subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb + subMenu = std_separator +# subMenu = smLaunchControl, "Launch Control" +# subMenu = std_separator +# subMenu = smRollingLaunch, "Rolling Launch" +# subMenu = std_separator +# subMenu = antiLag, "Antilag Setup" +# subMenu = std_separator + + + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + +[ControllerCommands] +; commandName = command1, command2, commandn... +; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. +; This does not include any resultant protocol envelope data, only the response data itself. + +; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands +; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition +; and may create error messages. +; It is expected that these commands would not typically alter any ram mapped to a Constant. + +; +; see TS_IO_TEST_COMMAND in firmware code +; + +cmd_test_spk1 = "w\x00\x12\x00\x01" +cmd_test_spk2 = "w\x00\x12\x00\x02" +cmd_test_spk3 = "w\x00\x12\x00\x03" +cmd_test_spk4 = "w\x00\x12\x00\x04" +cmd_test_spk5 = "w\x00\x12\x00\x05" +cmd_test_spk6 = "w\x00\x12\x00\x06" +cmd_test_spk7 = "w\x00\x12\x00\x07" +cmd_test_spk8 = "w\x00\x12\x00\x08" +cmd_test_spk9 = "w\x00\x12\x00\x09" +cmd_test_spk10 = "w\x00\x12\x00\x0a" +cmd_test_spk11 = "w\x00\x12\x00\x0b" +cmd_test_spk12 = "w\x00\x12\x00\x0c" +cmd_test_spk13 = "w\x00\x12\x00\x0d" +cmd_test_spk14 = "w\x00\x12\x00\x0e" +cmd_test_spk15 = "w\x00\x12\x00\x0f" +cmd_test_spk16 = "w\x00\x12\x00\x10" + + +cmd_test_inj1 = "w\x00\x13\x00\x01" +cmd_test_inj2 = "w\x00\x13\x00\x02" +cmd_test_inj3 = "w\x00\x13\x00\x03" +cmd_test_inj4 = "w\x00\x13\x00\x04" +cmd_test_inj5 = "w\x00\x13\x00\x05" +cmd_test_inj6 = "w\x00\x13\x00\x06" +cmd_test_inj7 = "w\x00\x13\x00\x07" +cmd_test_inj8 = "w\x00\x13\x00\x08" +cmd_test_inj9 = "w\x00\x13\x00\x09" +cmd_test_inj10 = "w\x00\x13\x00\x0a" +cmd_test_inj11 = "w\x00\x13\x00\x0b" +cmd_test_inj12 = "w\x00\x13\x00\x0c" +cmd_test_inj13 = "w\x00\x13\x00\x0d" +cmd_test_inj14 = "w\x00\x13\x00\x0e" +cmd_test_inj15 = "w\x00\x13\x00\x0f" +cmd_test_inj16 = "w\x00\x13\x00\x10" + +cmd_test_fuel_pump = "w\x00\x14\x00\x01" +cmd_calibrate_tps_1_closed = "w\x00\x14\x00\x02" +cmd_calibrate_tps_1_wot = "w\x00\x14\x00\x03" +cmd_calibrate_tps_2_closed = "w\x00\x14\x00\x04" +cmd_calibrate_tps_2_wot = "w\x00\x14\x00\x05" +cmd_calibrate_pedal_up = "w\x00\x14\x00\x06" +cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" +cmd_tle8888_init = "w\x00\x14\x00\x08" +cmd_test_ac_relay = "w\x00\x14\x00\x09" +cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" +cmb_etb_auto_calibrate = "w\x00\x14\x00\x0E" +cmd_disable_self_stim = "w\x00\x14\x00\x0F" +cmd_etb_autotune_stop = "w\x00\x14\x00\x10" + +cmd_test_radiator_fan = "w\x00\x15\x00\x01" +cmd_test_check_engine_light = "w\x00\x16\x00\x01" +cmd_test_idle_valve = "w\x00\x17\x00\x01" +cmd_cj125_calibrate = "w\x00\x18\x00\x00" +cmd_call_from_pit = "w\x00\x20\x34\x56" +cmd_stop_engine = "w\x00\x79\x00\x00" + +; reboot ECU +cmd_reset_controller = "w\x00\xbb\x00\x00" +; jump to DFU mode +cmd_dfu = "w\x00\xba\x00\x00" + +; See 'executeTSCommand' in firmware source code + + +; MRE_MIATA_NB2_MAP = 11 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAP = "w\x00\x30@@ET_MRE_MIATA_NB2_MAP_16_hex@@" + +; MRE_MIATA_NA6 12 +cmd_set_engine_type_microRusEFI_Miata_NA6 = "w\x00\x30@@ET_MRE_MIATA_NA6_16_hex@@" + +; MRE_MIATA_NB2_MAF = 15 +cmd_set_engine_type_microRusEFI_Miata_NB2_MAF = "w\x00\x30@@ET_MRE_MIATA_NB2_MAF_16_hex@@" + +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Frankenso_Miata_NA6_VAF = "w\x00\x30@@ET_FRANKENSO_MIATA_NA6_VAF_16_hex@@" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Frankenso_Miata_NB2 = "w\x00\x30@@ET_FRANKENSO_MIATA_NB2_16_hex@@" + +cmd_set_engine_type_Proteus_M73 = "w\x00\x30@@ET_BMW_M73_PROTEUS_16_hex@@" + + +; ETB_BENCH_ENGINE = 58 +cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" +; ETB_BENCH_ENGINE = 59 +cmd_set_engine_type_8888_test = "w\x00\x30\x00\x3B" +cmd_set_engine_type_default = "w\x00\x31\x00\x00" + +[UserDefined] + dialog = fuelTableBottomDialog, "", card + panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} + panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} + panel = fuelTableELTbl, Center + + dialog = fuelTableRight, "", yAxis + topicHelp = "https://rusefi.com/s/fuel" + displayOnlyField = "Fuel Algorithm", fuelAlgorithm + panel = fuelTableBottomDialog, Center + liveGraph = fuelLive, "Fuel", South + graphLine = AFRValue + graphLine = RPMValue + + dialog = fuelTableGaugesPanel, yAxis + gauge = TPSGauge + gauge = MAFGauge + gauge = MAPGauge + + dialog = fuelTableDialog, "Fuel Table", xAxis + topicHelp = "fuelHelp" + panel = fuelTableGaugesPanel + panel = fuelTableRight + + dialog = tChargeRpmTpsSettings, "RPM+TPS Mode Settings" + field = "We use these coefficients to approximate air/fuel charge temperate" + field = "based on CLT and IAT, depending on RPM and TPM" + field = "minRPM minTPS", tChargeMinRpmMinTps + field = "minRPM maxTPS", tChargeMinRpmMaxTps + field = "maxRPM minTPS", tChargeMaxRpmMinTps + field = "maxRPM maxTPS", tChargeMaxRpmMaxTps + + dialog = tChargeGeneralSettings, "" + field = "tCharge Mode", tChargeMode + field = "tChange Increment Limit, deg/sec", tChargeAirIncrLimit + field = "tChange Decrement Limit, deg/sec", tChargeAirDecrLimit + field = "" + + dialog = tChargeAirInterpSettings, "Air Interpolation Mode Settings" + field = "Min tCharge Coeff.", tChargeAirCoefMin + field = "Max tCharge Coeff.", tChargeAirCoefMax + field = "Max Air Flow, kg/h", tChargeAirFlowMax + + dialog = tChargeSettings, "tCharge Settings" + panel = tChargeGeneralSettings + panel = tChargeRpmTpsSettings, { tChargeMode == 0} + panel = tChargeAirInterpSettings, { tChargeMode == 1} + + dialog = baseInjection, "General" + field = "Enabled", isInjectionEnabled + field = "Mode", injectionMode, {isInjectionEnabled == 1} + field = "#Batch injection with individual wiring" + field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2} +#if tuneByTPS + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} +#else + field = "#Enabled for TPS-Based 'VE Autotune Mode' in Project Settings" + field = "Use TPS instead of Load for VE table", useTPSBasedVeTable, {0} +#endif + + dialog = ignitionOutputs, "Ignition Outputs" + field = "Ignition Pin Mode", ignitionPinMode, {isIgnitionEnabled == 1} + field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} + ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says + ; this section is auto-generated by FiringOrderTSLogic.java +@@FIRINGORDER@@ + field = "This is useful to have tachometer working" + field = " while converting from distributor" + field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} + field = "Dizzy out Pin Mode", dizzySparkOutputPinMode, {isIgnitionEnabled == 1} + + dialog = ignitionBasic, "" + field = "Enabled", isIgnitionEnabled + field = "Mode", ignitionMode, {isIgnitionEnabled == 1} + field = "#Wasted spark with individual coils" + field = "Two wire wasted", twoWireBatchIgnition, {isIgnitionEnabled == 1 && ignitionMode == 2} + field = "Timing Mode", timingMode, {isIgnitionEnabled == 1} + field = "Use TPS-based Advance Table", useTPSAdvanceTable, {isIgnitionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + field = "#Use fixed timing while validating with a timing gun" + field = "Fixed Timinig", fixedTiming, {isIgnitionEnabled == 1 && timingMode == 1} + + dialog = ignitionSettings, "", xAxis + panel = ignitionBasic + panel = ignitionOutputs + + dialog = baseEngineConfig, "Engine Configuration" +; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog + field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog + field = "Manufacturer Engine Code", engineCode +; this field is useful for rusEFI online catalog + field = "Vehicle Name", vehicleName + field = "Number of Cylinders", cylindersCount + field = "Engine Displacement", displacement + field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction + +; Engine->Trigger configuration + dialog = triggerConfiguration_settings, "Trigger Pattern" + field = "!https://rusefi.com/s/trigger" + field = "Trigger type", trigger_type + field = "Total tooth count", trigger_customTotalToothCount, {trigger_type == 0}, {trigger_type == 0} + field = "Missing/skipped tooth count", trigger_customSkippedToothCount, {trigger_type == 0}, {trigger_type == 0} + + ; see also in firmware '[doesTriggerImplyOperationMode]' tag + field = "Operation mode / speed", ambiguousOperationMode + field = "With VR sensors only rising edge has reliable position" + field = "use only rising edge", useOnlyRisingEdgeForTrigger + field = "!Reminder that 4-stroke cycle is 720 degrees" + field = "!For well-known trigger types use '0' trigger angle offset" + field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer + + dialog = triggerConfiguration_IO, "Advanced Trigger" + field = "!https://rusefi.com/s/vvt" + field = "VVT mode", vvtMode, {trigger_type != 80} + field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} + field = "VVT position display offset", vvtOffset + field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} + + dialog = triggerInputs, "Trigger Inputs" + field = "!ECU reboot needed to apply these settings" + field = "#Cam is primary if you have cam sensor" + field = "Primary channel", triggerInputPins1 + field = "Invert Primary", invertPrimaryTriggerSignal + field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} + field = "Cam Sync/VVT input", camInputs1 + panel = triggerInputComparator @@if_ts_show_trigger_comparator + + + dialog = triggerConfiguration + panel = triggerConfiguration_settings, North + panel = triggerInputs, South + +; Engine->Injection Settings + dialog = injChars, "Injector Settings", yAxis + field = "Injector Flow", injector_flow, {isInjectionEnabled == 1} + + dialog = injectorOutputSettings, "Injector Outputs", yAxis + field = "!ECU reboot needed to apply these settings" + field = "injection Pin Mode", injectionPinMode, {isInjectionEnabled == 1} + field = "With batched injection without 'Two wire batch emulation'" + field = " fill only first count / 2 values" + field = "Injection Pin 1", injectionPins1, {isInjectionEnabled == 1} + field = "Injection Pin 2", injectionPins2, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 1} + field = "Injection Pin 3", injectionPins3, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 2} + field = "Injection Pin 4", injectionPins4, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 3} + field = "Injection Pin 5 ", injectionPins5, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 4} + field = "Injection Pin 6 ", injectionPins6, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 5} + field = "Injection Pin 7 ", injectionPins7, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 6} + field = "Injection Pin 8 ", injectionPins8, {isInjectionEnabled == 1 && injectionMode != 3 && cylindersCount > 7} + field = "Injection Pin 9 ", injectionPins9, {isInjectionEnabled == 1 && cylindersCount > 8} + field = "Injection Pin 10 ", injectionPins10, {isInjectionEnabled == 1 && cylindersCount > 9} + field = "Injection Pin 11 ", injectionPins11, {isInjectionEnabled == 1 && cylindersCount > 10} + field = "Injection Pin 12 ", injectionPins12, {isInjectionEnabled == 1 && cylindersCount > 11} + + dialog = injectionBasic, "" + topicHelp = "fuelHelp" + panel = baseInjection + panel = injChars + + dialog = injectionSettings, "", xAxis + panel = injectionBasic + panel = injectorOutputSettings + + dialog = injectionDeadTime, "", yAxis + panel = injectorsDeadTime, East + + dialog = ignitionCylExtra, "Ignition Cylinder Extra Timing" + field = "Extra cyl #1", timing_offset_cylinder1 + field = "Extra cyl #2", timing_offset_cylinder2, {cylindersCount > 1} + field = "Extra cyl #3", timing_offset_cylinder3, {cylindersCount > 2} + field = "Extra cyl #4", timing_offset_cylinder4, {cylindersCount > 3} + field = "Extra cyl #5", timing_offset_cylinder5, {cylindersCount > 4} + field = "Extra cyl #6", timing_offset_cylinder6, {cylindersCount > 5} + field = "Extra cyl #7", timing_offset_cylinder7, {cylindersCount > 6} + field = "Extra cyl #8", timing_offset_cylinder8, {cylindersCount > 7} + field = "Extra cyl #9", timing_offset_cylinder9, {cylindersCount > 8} + field = "Extra cyl #10", timing_offset_cylinder10, {cylindersCount > 9} + field = "Extra cyl #11", timing_offset_cylinder11, {cylindersCount > 10} + field = "Extra cyl #12", timing_offset_cylinder12, {cylindersCount > 11} + + dialog = multisparkDwellParams, "Delay & Dwell" + field = "Spark Duration", multisparkSparkDuration, {multisparkEnable} + field = "Dwell", multisparkDwell, {multisparkEnable} + + dialog = multisparkMain, "Configuration" + field = "Maximum engine speed", multisparkMaxRpm, {multisparkEnable} + field = "Fire sparks for this angle duration" multisparkMaxSparkingAngle, {multisparkEnable} + field = "Maximum extra spark count" multisparkMaxExtraSparkCount, {multisparkEnable} + + dialog = multisparkSettings, "Multispark" + field = "#WARNING! These settings have the potential to overheat ignition components" + field = "#and cause other nasty misbehavior. Use with care, at your own risk!" + field = "Enable Multiple Sparks", multisparkEnable + panel = multisparkMain + panel = multisparkDwellParams + + dialog = dwellSettings, "", yAxis + panel = dwellCorrection, Center + +; Sensors->AUX1 Thermistor Sensor Setting + dialog = auxTempSensor1Sensor, "aux1 Thermistor Settings" + field = "Input channel", auxTempSensor1_adcChannel + field = "Bias resistor", auxTempSensor1_bias_resistor, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor1_tempC_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor1_resistance_1, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor1_tempC_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor1_resistance_2, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor1_tempC_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor1_resistance_3, {auxTempSensor1_adcChannel != @@ADC_CHANNEL_NONE@@} + +; Sensors->AUX2 Thermistor Sensor Setting + dialog = auxTempSensor2Sensor, "aux2 Thermistor Settings" + field = "Input channel", auxTempSensor2_adcChannel + field = "Bias resistor", auxTempSensor2_bias_resistor, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Here is three pairs of thermistor temperature and resistance." + field = "#Typical temperatures is -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", auxTempSensor2_tempC_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", auxTempSensor2_resistance_1, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", auxTempSensor2_tempC_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", auxTempSensor2_resistance_2, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum1, "Throttle #1" + field = "!See Tools>Calibrate TPS" + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tpsMax, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Primary max", tps2Max, {tps2_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 + + dialog = pedalSensorLeft, "Accelerator pedal" + field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage + field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel + field = "Up voltage" throttlePedalSecondaryUpVoltage + field = "Down (WOT) voltage", throttlePedalSecondaryWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + field = mc33_i_boost, mc33_i_boost + field = mc33_i_peak, mc33_i_peak + field = mc33_i_hold, mc33_i_hold + field = mc33_t_max_boost, mc33_t_max_boost + field = mc33_t_peak_off, mc33_t_peak_off + field = mc33_t_peak_tot, mc33_t_peak_tot + field = mc33_t_bypass, mc33_t_bypass + field = mc33_t_hold_off, mc33_t_hold_off + field = mc33_t_hold_tot, mc33_t_hold_tot + + +; Sensor Inputs + dialog = otherSensorInputs, "Other Sensor Inputs" + field = "Fuel level", fuelLevelSensor + field = "Clutch down switch", clutchDownPin + field = "Clutch down inverted", clutchDownPinMode + field = "Clutch up switch", clutchUpPin + field = "Clutch up inverted", clutchUpPinMode + field = "Throttle Up switch", throttlePedalUpPin + field = "Brake pedal switch", brakePedalPin + field = "A/C switch", acSwitchAdc + + dialog = triggerInputComparator, "Built-in Comparator Settings (Kinetis-only)" + field = "Comparator Center Point Voltage", triggerCompCenterVolt + field = "Comparator hysteresis voltage (Min)", triggerCompHystMin + field = "Comparator hysteresis voltage (Max)", triggerCompHystMax + field = "VR-sensor saturation RPM", triggerCompSensorSatRpm + + dialog = joystickPanel, "Joystick" + field = "joustick center button", joystickCenterPin + field = "joustick button A", joystickAPin + field = "joustick button B", joystickBPin + field = "joustick button C", joystickCPin + field = "joustick button D", joystickDPin + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; + dialog = allPinsSensors, "Sensors" + field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel + field = "Primary input channel", triggerInputPins1 + field = "Secondary channel", triggerInputPins2 + field = "Cam Sync/VVT input", camInputs1 + field = "CLT ADC input", clt_adcChannel + field = "IAT ADC input", iat_adcChannel + field = "vBatt ADC input", vbattAdcChannel + field = "TPS1 ADC input", tps1_1AdcChannel + field = "TPS2 ADC input", tps2_1AdcChannel + field = "MAF ADC input", mafAdcChannel + field = "AFR ADC input", afr_hwChannel + field = "Baro ADC input", baroSensor_hwChannel + field = "MAP ADC input", map_sensor_hwChannel + field = "FrequencyReportingMapInputPin", frequencyReportingMapInputPin + field = "FuelLevelSensor", fuelLevelSensor + field = "Vehicle Speed Input pin", vehicleSpeedSensorInputPin + field = "clutchDownPin", clutchDownPin + field = "clutchUpPin", clutchUpPin + field = "brakePedalPin", brakePedalPin + field = "A/C Switch", acSwitchAdc + field = "Aux Temperature #1", auxTempSensor1_adcChannel + field = "Aux Temperature #2", auxTempSensor2_adcChannel + field = "Aux Fast Analog", auxFastSensor1_adcChannel + + dialog = allPinsMC33, "MC33816" + field = "Chip Select", mc33816_cs + field = rstb, mc33816_rstb + field = flag0, mc33816_flag0 + field = mc33816_driven, mc33816_driven + field = mc33816spiDevice, mc33816spiDevice + + dialog = allPins1_1 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 + field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 + field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 + field = "Warning Led", warningLedPin + field = "tle6240_cs", tle6240_cs + field = "tle6240 SPI", tle6240spiDevice + panel = joystickPanel + + dialog = allPins1_2 + field = "Tachometer output Pin", tachOutputPin + field = "Dizzy out Pin", dizzySparkOutputPin + field = "O2 heater pin", o2heaterPin + field = "Idle Solenoid Pin", idle_solenoidPin + field = "Second Idle Solenoid Pin", secondSolenoidPin + field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Step", idle_stepperStepPin + field = "Idle Stepper Enable", stepperEnablePin + field = "Fuel Pump Pin", fuelPumpPin + field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins + field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins + field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins + field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins + field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card + field = "MIL / Check Engine Pin", malfunctionIndicatorPin + field = "test557pin", test557pin + field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin + field = "Main Relay Pin", mainRelayPin + field = "Starter Relay Pin", starterRelayDisablePin + + dialog = allPins2_1 + field = "Injection Pin 1", injectionPins1 + field = "Injection Pin 2", injectionPins2 + field = "Injection Pin 3", injectionPins3 + field = "Injection Pin 4", injectionPins4 + field = "Injection Pin 5 ", injectionPins5 + field = "Injection Pin 6 ", injectionPins6 + field = "Injection Pin 7 ", injectionPins7 + field = "Injection Pin 8 ", injectionPins8 + field = "Injection Pin 9 ", injectionPins9 + field = "Injection Pin 10 ", injectionPins10 + field = "Injection Pin 11 ", injectionPins11 + field = "Injection Pin 12 ", injectionPins12 + field = "FSIO dig inp #1", fsioDigitalInputs1 + field = "FSIO dig inp #2", fsioDigitalInputs2 + field = "FSIO dig inp #3", fsioDigitalInputs3 + field = "FSIO dig inp #4", fsioDigitalInputs4 + field = "FSIO dig inp #5", fsioDigitalInputs5 + field = "FSIO dig inp #6", fsioDigitalInputs6 + field = "FSIO dig inp #7", fsioDigitalInputs7 + field = "FSIO dig inp #8", fsioDigitalInputs8 + field = "FSIO dig inp #9", fsioDigitalInputs9 + field = "FSIO dig inp #10", fsioDigitalInputs10 + field = "FSIO dig inp #11", fsioDigitalInputs11 + field = "FSIO dig inp #12", fsioDigitalInputs12 + field = "FSIO dig inp #13", fsioDigitalInputs13 + field = "FSIO dig inp #14", fsioDigitalInputs14 + field = "FSIO dig inp #15", fsioDigitalInputs15 + field = "FSIO dig inp #16", fsioDigitalInputs16 + + + dialog = allPins2_2 + field = "Ignition Pin 1", ignitionPins1 + field = "Ignition Pin 2", ignitionPins2 + field = "Ignition Pin 3", ignitionPins3 + field = "Ignition Pin 4", ignitionPins4 + field = "Ignition Pin 5", ignitionPins5 + field = "Ignition Pin 6", ignitionPins6 + field = "Ignition Pin 7", ignitionPins7 + field = "Ignition Pin 8", ignitionPins8 + field = "Ignition Pin 9", ignitionPins9 + field = "Ignition Pin 10", ignitionPins10 + field = "Ignition Pin 11", ignitionPins11 + field = "Ignition Pin 12", ignitionPins12 + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + + dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 + field = "Debug Trigger Sync", debugTriggerSync + panel = allPinsMC33 + + dialog = allPins1_3 + field = "FSIO ADC #1", fsioAdc1 + field = "FSIO ADC #2", fsioAdc2 + field = "FSIO ADC #3", fsioAdc3 + field = "FSIO ADC #4", fsioAdc4 + field = "GPS RX", gps_rx_pin @@if_ts_show_gps + field = "GPS TX", gps_tx_pin @@if_ts_show_gps + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "hip9011CsPin", hip9011CsPin + field = "LIS302DLCsPin", LIS302DLCsPin + field = "MIL / Check Engine", malfunctionIndicatorPin + field = "Saab CDM knock", cdmInputPin + field = "comm status light", communicationLedPin + field = "running status light", runningLedPin + + + dialog = allPins3_1 + panel = allPinsSensors + + dialog = allPins3_2 + field = "servo#1", servoOutputPins1 + field = "servo#2", servoOutputPins2 + field = "servo#3", servoOutputPins3 + field = "servo#4", servoOutputPins4 + field = "servo#5", servoOutputPins5 + field = "Aux Pin #1", auxPidPins1 + field = "Aux Pin #2", auxPidPins2 + field = "Aux Pin #3", auxPidPins3 + field = "Aux Pin #4", auxPidPins4 + field = "Aux Valve #1", auxValves1 + field = "Aux Valve #2", auxValves2 + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin + + dialog = allPins3_1_and_2, "All Pins 3/3", xAxis + panel = allPins3_1 + panel = allPins3_2 + + dialog = allPins1_1_and_2, "", xAxis + panel = allPins1_1 + panel = allPins1_2 + + dialog = allPins1, "All Pins 1/3", xAxis + panel = allPins1_1_and_2 + panel = allPins1_3 + + dialog = allPins2_1_and_2, "", xAxis + panel = allPins2_1 + panel = allPins2_2 + + dialog = allPins2, "All Pins 2/3", xAxis + panel = allPins2_1_and_2 + panel = allPins2_3 + + +; Sensors->CLT sensor + dialog = clt_thermistor, "CLT sensor" + field = "Input channel", clt_adcChannel + field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", clt_tempC_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", clt_resistance_1, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", clt_tempC_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", clt_resistance_2, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", clt_tempC_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", clt_resistance_3, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearCltSensor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = cltGauges + gauge = CLTGauge + gauge = rawCltGauge + + dialog = cltSensor, "CLT Sensor", border + panel = clt_thermistor, West + panel = cltGauges, East + +; Sensors->IAT sensor + dialog = iat_thermistor, "IAT sensor" + field = "Input channel", iat_adcChannel + field = "Bias resistor", iat_bias_resistor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + field = "#Input three pairs of thermistor temperature and resistance." + field = "#Typical temperatures are -40 deg C, 0 deg C and 100 deg C" + field = "" + field = "Lowest temperature", iat_tempC_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ LT", iat_resistance_1, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Middle temperature", iat_tempC_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ MT", iat_resistance_2, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Highest temperature", iat_tempC_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "Resistance @ HT", iat_resistance_3, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + field = "" + field = "Linear characteristic", useLinearIatSensor, {iat_adcChannel != @@ADC_CHANNEL_NONE@@} + + dialog = iatGauges + gauge = IATGauge + gauge = rawIatGauge + + dialog = iatSensor, "IAT Sensor", border + panel = iat_thermistor, West + panel = iatGauges, East + +; Sensors->Oil pressure sensor + dialog = oilp_settings, "Oil Pressure Sensor" + field = "Oil Pressure ADC input", oilPressure_hwChannel + field = "low voltage", oilPressure_v1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "low pressure", oilPressure_value1, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high voltage", oilPressure_v2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + field = "high pressure", oilPressure_value2, {oilPressure_hwChannel != @@ADC_CHANNEL_NONE@@} + + dialog = oilPressureGauges + gauge = OilPressGauge + gauge = rawOilPressureGauge + + dialog = oilPressureSensor, "", border + panel = oilp_settings, West + panel = oilPressureGauges, East + +; Sensors->MAP sensor + dialog = mapSensorAnalog, "MAP sensor", yAxis + field = "MAP ADC input", map_sensor_hwChannel + field = "MAP type", map_sensor_type, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ } + field = "MAP value low point", map_sensor_lowValue, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage low point", mapLowValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP value high point", map_sensor_highValue,{ map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + field = "MAP voltage high value", mapHighValueVoltage, { map_sensor_hwChannel != @@ADC_CHANNEL_NONE@@ && map_sensor_type == 0 } + + dialog = mapSensorFreq, "MAP frequency sensor", yAxis + field = "MAP Freq", frequencyReportingMapInputPin + field = "0 kPa freq", mapFrequency0Kpa + field = "100 kpa freq", mapFrequency100Kpa + + dialog = mapCommon, "MAP common settings" + field = "frequency-based MAP", hasFrequencyReportingMapSensor + field = "Low value threshold", mapErrorDetectionTooLow + field = "High value threshold", mapErrorDetectionTooHigh + field = "" + field = "Measure Map Only In One Cylinder", measureMapOnlyInOneCylinder + field = "Minimum MAP samples", mapMinBufferLength + + dialog = mapSettings, "", yAxis + panel = mapCommon + panel = mapSensorAnalog, {hasFrequencyReportingMapSensor == 0} + panel = mapSensorFreq, {hasFrequencyReportingMapSensor == 1} + + dialog = baroSettings, "Baro sensor" + field = "Baro ADC input", baroSensor_hwChannel + field = baroSensor_lowValue, baroSensor_lowValue, {baroSensor_hwChannel != 16} + field = baroSensor_highValue, baroSensor_highValue, {baroSensor_hwChannel != 16} + field = baroSensor_type, baroSensor_type, {baroSensor_hwChannel != 16} + + dialog = mapCurves, "MAP sampling", yAxis + field = "isMapAveragingEnabled", isMapAveragingEnabled + panel = map_samplingAngleCurve + panel = map_samplingWindowCurve + + dialog = mafSettings, "MAF sensor", yAxis + field = "MAF ADC input", mafAdcChannel + +; Sensors->EGO sensor + dialog = egoSettings_sensor, "EGO sensor" + field = "Type", afr_type +; todo: only use these values for custom! + field = "low voltage", afr_v1 + field = "low value", afr_value1 + field = "high voltage", afr_v2 + field = "high value", afr_value2 + field = "Correction", egoValueShift + + dialog = egoSettings_IO, "EGO Sensor I/O" + field = "Input channel", afr_hwChannel + field = "Heater pin", o2heaterPin + + dialog = egoSettings, "", yAxis + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} + field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } + +; Engine->EGT inputs + dialog = egtInputs, "EGT inputs" + field = "SPI", max31855spiDevice + field = "CS #1", max31855_cs1 + field = "CS #2", max31855_cs2 + field = "CS #3", max31855_cs3 + field = "CS #4", max31855_cs4 + field = "CS #5", max31855_cs5 + field = "CS #6", max31855_cs6 + field = "CS #7", max31855_cs7 + field = "CS #8", max31855_cs8 + +; Engine->idle Settings + dialog = idleSolenoid, "Solenoid" + field = "Idle Solenoid Pin Mode", idle_solenoidPinMode, !useStepperIdle + field = "Idle Solenoid Pin", idle_solenoidPin, !useStepperIdle + field = "Second Idle Solenoid Pin", secondSolenoidPin, { !useStepperIdle && isDoubleSolenoidIdle } + field = "Idle Solenoid Frequency", idle_solenoidFrequency, !useStepperIdle + + dialog = hbridgeHardware, "H-Bridge Hardware" + field = "PWM Frequency", etbFreq + field = "Two-wire mode", etb_use_two_wires + field = "No1 Direction #1", etbIo1_directionPin1 + field = "No1 Direction #2", etbIo1_directionPin2 + field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin + field = "No2 Direction #1", etbIo2_directionPin1 + field = "No2 Direction #2", etbIo2_directionPin2 + field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin + + dialog = idleStepperHw, "Stepper Hardware" + field = "Idle Stepper Step Pin", idle_stepperStepPin + field = "Idle Stepper Dir Pin", idle_stepperDirectionPin + field = "Idle Stepper Enable Pin", stepperEnablePin + field = "Idle Stepper Enable Pin Mode", stepperEnablePinMode + + dialog = idleStepper, "Stepper" + field = "Drive stepper with dual H bridges", useHbridges, useStepperIdle + field = "Stepper reaction time", idleStepperReactionTime, useStepperIdle + field = "Stepper total steps", idleStepperTotalSteps, useStepperIdle + field = "Stepper parking extra steps, %", stepperParkingExtraSteps, useStepperIdle + field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle + panel = idleStepperHw, { useStepperIdle && !useHbridges } + panel = hbridgeHardware, { useStepperIdle && useHbridges } + + dialog = idleHwType, "Idle Valve Hardware", border + panel = idleSolenoid, West + panel = idleStepper, East + + dialog = idlehw, "", yAxis + field = "!ECU reboot needed to apply these settings" + field = "Use Stepper", useStepperIdle + field = "Double Solenoid Mode", isDoubleSolenoidIdle + panel = idleHwType + + dialog = idlePidSettings, "PID IAC Control" + field = "#See Idle Target RPM Curve" + field = "P-factor", idleRpmPid_pFactor + field = "I-factor", idleRpmPid_iFactor + field = "D-factor", idleRpmPid_dFactor + field = "Offset", idleRpmPid_offset + field = "Min", idleRpmPid_minValue + field = "Max", idleRpmPid_maxValue + field = "iTerm Min", idlerpmpid_iTermMin + field = "iTerm Max", idlerpmpid_iTermMax + field = "Offset#2", idleRpmPid2_offset + field = "Min#2", idleRpmPid2_minValue + field = "period", idleRpmPid_periodMs + field = "RPM dead zone to deactivate IAC pid", idlePidRpmDeadZone + field = "RPM upper limit to deactivate IAC pid",idlePidRpmUpperLimit + field = "PID Extra for low RPM", pidExtraForLowRpm + field = "Use IAC PID Multiplier Table", useIacPidMultTable + + + dialog = idleSettings, "", yAxis + field = "Idle IAC control mode", idleMode + field = useInstantRpmForIdle, useInstantRpmForIdle + field = "use ETB for idle", useETBforIdleControl + field = "ETB Idle range", etbIdleThrottleRange, {useETBforIdleControl == 1} + field = "Use separate Ignition Table for idle", useSeparateAdvanceForIdle + field = "Use separate VE Table for idle", useSeparateVeForIdle + field = "Use separate IAC Table For Coasting", useIacTableForCoasting, {idleMode == 0} + field = idleIncrementalPidCic, idleIncrementalPidCic + field = "TPS deactivation threshold", idlePidDeactivationTpsThreshold + panel = idlePidSettings, { idleMode == 0} + field = "Extra IAC if Throttle Pressed", iacByTpsTaper; + field = "Detailed status in console", isVerboseIAC + field = "#See Warmup idle multiplier" + slider = "Manual IAC Position", manIdlePosition, horizontal + + dialog = idleTimingPidCorrDialog, "", yAxis + field = "!This timing correction mode is Alpha Version" + field = "Use Auto-PID ignition advance control", useIdleTimingPidControl + field = "#See Idle Target RPM Curve" + field = "P-factor", idleTimingPid_pFactor, {useIdleTimingPidControl == 1} + field = "I-factor", idleTimingPid_iFactor, {useIdleTimingPidControl == 1} + field = "D-factor", idleTimingPid_dFactor, {useIdleTimingPidControl == 1} + field = "Offset", idleTimingPid_offset, {useIdleTimingPidControl == 1} + field = "Min Delta", idleTimingPid_minValue, {useIdleTimingPidControl == 1} + field = "Max Delta", idleTimingPid_maxValue, {useIdleTimingPidControl == 1} + field = "period", idleTimingPid_periodMs, {useIdleTimingPidControl == 1} + field = "#See RPM dead zone to deactivate IAC pid" + field = "RPM working zone for timing pid", idleTimingPidWorkZone, {useIdleTimingPidControl == 1} + field = "RPM working zone falloff", idlePidFalloffDeltaRpm, {useIdleTimingPidControl == 1} + field = "RPM dead zone to deactivate timing pid", idleTimingPidDeadZone, {useIdleTimingPidControl == 1} + +; Engine->Fan Settings + dialog = fanSetting, "Fan Settings" + field = "Pin", fanPin + field = "Pin mode", fanPinMode + field = "On temperature", fanOnTemperature + field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode + + dialog = fuelPumpConfig, "Fuel Pump" + field = "Pin", fuelPumpPin + field = "Pin mode", fuelPumpPinMode + field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" + field = "Absolute Fuel Pressure", absoluteFuelPressure + field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + +; Controller->Actuator Outputs + dialog = mainRelayDialog, "Main relay output" + field = "microRusEFI main relay control is hard wired on pin #29"@@if_ts_show_main_relay_microRusEFI_message + field = "Pin", mainRelayPin@@if_ts_show_main_relay + field = "Pin mode", mainRelayPinMode@@if_ts_show_main_relay + + dialog = starterRelay, "Starter relay output" + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode + + dialog = statusLeds, "Status LEDs" + field = "Running status LED", runningLedPin + field = "TS communication status LED", communicationLedPin + field = "Warning LED", warningLedPin + field = "Trigger error LED", triggerErrorPin + field = "Debug Trigger Sync", debugTriggerSync + +; Engine->MIL Settings + dialog = malfunction, "Check Engine Settings" + field = "Pin", malfunctionIndicatorPin + field = "Pin mode", malfunctionIndicatorPinMode + field = "Warning Period", warningPeriod + +; Engine->hip9011 Settings + dialog = hipFunction, "HIP9011 Settings (knock decoder)" + field = "Enabled", isHip9011Enabled + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} + field = "!ECU reboot needed to apply these settings" + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} + field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + panel = knockThresholdCurve + +; Engine->cj125 Settings + dialog = cj125Function, "CJ125 Settings (wbo decoder)" + field = "Enabled", isCJ125Enabled + commandButton = "Calibrate", cmd_cj125_calibrate + field = "Using 4.9 sensor?", cj125isLsu49 + field = "!ECU reboot needed to apply these settings" + field = "ChipSelect pin", cj125CsPin, {isCJ125Enabled == 1} + field = "ChipSelect mode", cj125CsPinMode, {isCJ125Enabled == 1} + field = "!See also 'Controller-SPI setting'" + field = "SPI device", cj125SpiDevice + field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1} + field = "UA input", cj125ua, {isCJ125Enabled == 1} + field = "UR input", cj125ur, {isCJ125Enabled == 1} + field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1} + field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1} + + dialog = spiFunction, "SPI settings" + field = "!ECU reboot needed to apply these settings" + field = "SPI1 enable", is_enabled_spi_1 + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1mosi mode", spi1MosiMode, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1miso mode", spi1MisoMode, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI1sck mode", spi1SckMode, {is_enabled_spi_1 == 1} + + field = "SPI2 enable", is_enabled_spi_2 + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2mosi mode", spi2MosiMode, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2miso mode", spi2MisoMode, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI2sck mode", spi2SckMode, {is_enabled_spi_2 == 1} + + field = "SPI3 enable", is_enabled_spi_3 + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3mosi mode", spi3MosiMode, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3miso mode", spi3MisoMode, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "SPI3sck mode", spi3SckMode, {is_enabled_spi_3 == 1} + field = "LIS302DLCsPin", LIS302DLCsPin + + dialog = stftPartitioning, "Region Configuration" + field = "Idle region RPM", stft_maxIdleRegionRpm + field = "Overrun region load", stft_maxOverrunLoad + field = "Power region load", stft_minPowerLoad + + dialog = stftPartitionSettingsMain, "Main Region", xAxis + field = "Time Const", stft_cellCfgs4_timeConstant + field = "Max add", stft_cellCfgs4_maxAdd + field = "Max remove", stft_cellCfgs4_maxRemove + + dialog = stftPartitionSettingsIdle, "Idle Region", xAxis + field = "Time Const", stft_cellCfgs1_timeConstant + field = "Max add", stft_cellCfgs1_maxAdd + field = "Max remove", stft_cellCfgs1_maxRemove + + dialog = stftPartitionSettingsPower, "Power Region", xAxis + field = "Time Const", stft_cellCfgs3_timeConstant + field = "Max add", stft_cellCfgs3_maxAdd + field = "Max remove", stft_cellCfgs3_maxRemove + + dialog = stftPartitionSettingsOverrun, "Overrun Region", xAxis + field = "Time Const", stft_cellCfgs2_timeConstant + field = "Max add", stft_cellCfgs2_maxAdd + field = "Max remove", stft_cellCfgs2_maxRemove + + dialog = fuelClosedLoopDialog, "Short-term fuel trim" + field = "Enabled", fuelClosedLoopCorrectionEnabled + + field = "Startup delay" stft_startupDelay, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum CLT for correction", stft_minClt, {fuelClosedLoopCorrectionEnabled == 1} + field = "Minimum AFR for correction", stft_minAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Maximum AFR for correction", stft_maxAfr, {fuelClosedLoopCorrectionEnabled == 1} + field = "Adjustment deadband", stft_deadband, {fuelClosedLoopCorrectionEnabled == 1} + field = "Ignore error magnitude", stftIgnoreErrorMagnitude, {fuelClosedLoopCorrectionEnabled == 1} + + panel = stftPartitioning, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsMain, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsIdle, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsPower, {fuelClosedLoopCorrectionEnabled == 1} + panel = stftPartitionSettingsOverrun, {fuelClosedLoopCorrectionEnabled == 1} + + dialog = auxPidDialog, "Aux PID" + field = "Enabled", activateAuxPid1 + field = "FSIO pin #1", auxPidPins1 + field = "PWM Frequency", auxPidFrequency1 + field = "Detailed status in console", isVerboseAuxPid1 + field = "#target based on FSIO map#1" + field = "control period", auxPid1_periodMs, {activateAuxPid1 == 1} + field = "#PID control" + field = "offset", auxPid1_offset, {activateAuxPid1 == 1} + field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1} + field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1} + field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1} + field = "Min", auxPid1_minValue, {activateAuxPid1 == 1} + field = "Max", auxPid1_maxValue, {activateAuxPid1 == 1} + field = "FSIO pin #2", auxPidPins2 + field = "FSIO pin #3", auxPidPins3 + field = "FSIO pin #4", auxPidPins4 + +; Engine->Battery & Alternator + dialog = batteryDialog, "Battery Settings", yAxis + field = "vBatt ADC input", vbattAdcChannel + field = "Battery Input Divider Coefficient", vbattDividerCoeff + dialog = alternator, "Alternator Settings", yAxis + field = "Enabled", isAlternatorControlEnabled + field = "simple on/off mode", onOffAlternatorLogic, {isAlternatorControlEnabled == 1} + field = "Target", targetVBatt, {isAlternatorControlEnabled == 1} + field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1} + field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1} + field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1} + field = "Detailed status in console", isVerboseAlternator, {isAlternatorControlEnabled == 1} + field = "control period", alternatorControl_periodMs, {isAlternatorControlEnabled == 1} + field = "#PID control" + field = "offset", alternatorControl_offset, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + 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", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} + field = "#% duty = Pterm + Iterm + Dterm + offset%" + + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} + + dialog = energySystems, "Battery and Alternator Settings", yAxis + panel = batteryDialog + panel = alternator + panel = startStopDialog + + dialog = speedSensorAnalog + field = "Input pin", vehicleSpeedSensorInputPin + field = "revolution to speed mult", vehicleSpeedCoef + + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + + dialog = speedSensor, "Speed sensor", xAxis + panel = speedSensorLeft + gauge = VSSGauge + +; Engine->Other inputs + dialog = analogInputSettings, "Analog Input Settings" + field = "!ECU reboot needed to apply these settings" + field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap + field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider + field = "Smoothing factor", slowAdcAlpha + + dialog = tachSettings, "Tachometer output" + field = "!See also dizzySparkOutputPin" + field = "Pin", tachOutputPin + field = "Pin mode", tachOutputPinMode + field = "Rise at trigger index", tachPulseTriggerIndex + field = "Pulse duration is duty cycle", tachPulseDurationAsDutyCycle + field = "Pulse duration", tachPulseDuractionMs +; todo: finish implementation under #907 + field = "Pulse per Rev", tachPulsePerRev + + +; Board->Connection + dialog = tsPort, "TunerStudio Port" + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use UART/TTL serial?", useSerialPort + field = "TX pin", binarySerialTxPin, {useSerialPort == 1} + field = "RX pin", binarySerialRxPin, {useSerialPort == 1} + field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed + + dialog = canBus, "CAN Bus" + field = "Can Read Enabled", canReadEnabled + field = "Can Write Enabled", canWriteEnabled + field = "Can Nbc Type", canNbcType + field = "Can Baud Rate", canBaudRate + field = "Enable rusEFI CAN broadcast", enableVerboseCanTx + field = "rusEfi CAN data base address", verboseCanBaseAddress + field = "Can Sleep Period", canSleepPeriodMs + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins + + dialog = sdCard, "SD Card Logger" + field = "SdCard", isSdCardEnabled + field = "showSdCardWarning", showSdCardWarning + field = "CS Pin", sdCardCsPin + field = "SPI", sdCardSpiDevice + field = "log format", logFormat + field = "Mass Storage", storageMode + field = "Write Period", sdCardPeriodMs + + dialog = gpsReceiver, "GPS Receiver" + field = "gps RX", gps_rx_pin + field = "gps TX", gps_tx_pin + + dialog = lcdScreen, "LCD screen" + field = "display Mode", displayMode + field = "height", HD44780height + field = "width", HD44780width + field = "RS pin", HD44780_rs + field = "E pin", HD44780_e + field = "D4 pin", HD44780_db4 + field = "D5 pin", HD44780_db5 + field = "D6 pin", HD44780_db6 + field = "D7 pin", HD44780_db7 + + dialog = tle8888, "TLE8888", yAxis + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode + field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack + commandButton = "Reinit", cmd_tle8888_init + + dialog = connection, "", yAxis + field = "ADC vRef voltage", adcVcc + panel = tsPort @@if_ts_show_tunerstudio_port + panel = canBus + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card + panel = gpsReceiver @@if_ts_show_gps + + + dialog = monitoringSettings, "rusEfi Console Settings" + field = "Sensor Sniffer", sensorChartMode + field = " Threshold", sensorSnifferRpmThreshold + field = " Each X cycle", sensorChartFrequency + field = "Engine Sniffer", isEngineChartEnabled + field = " Threshold", engineSnifferRpmThreshold + + dialog = generalSettings, "General" + field = "!https://rusefi.com/s/fuel" + field = "Fuel strategy", fuelAlgorithm + + dialog = debugging, "Debug" + field = "!https://rusefi.com/s/debugmode" + field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning + + + dialog = limits, "Limits" + field = "RPM hard limit", rpmHardLimit + field = "Boost cut pressure", boostCutPressure + +; Engine->Base Engine Settings + dialog = engineChars, "Base Engine Settings" + topicHelp = "baseHelp" + panel = baseEngineConfig + panel = generalSettings + panel = limits + panel = debugging + + dialog = crankingFuel, "Fuel" + field = "Injection mode", crankingInjectionMode + field = "Fuel Source For Cranking", useRunningMathForCranking + field = "Base fuel pulse width", cranking_baseFuel, {useRunningMathForCranking == 0} + + dialog = crankingIAC, "IAC" + field = "Cranking IAC position", crankingIACposition + field = "After cranking IAC taper duration", afterCrankingIACtaperDuration + field = "Override IAC multiplier for cranking", overrideCrankingIacSetting + + dialog = crankingIgnition, "Ignition" + field = "Advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0} + field = "Use separate Advance Table for cranking", useSeparateAdvanceForCranking + field = "Use Advance Corrections for cranking", useAdvanceCorrectionsForCranking + field = "Use fixed cranking dwell", useConstantDwellDuringCranking + field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs, {useConstantDwellDuringCranking == 1} + field = "Cranking Dwell Angle", crankingChargeAngle, {useConstantDwellDuringCranking == 0} + + dialog = postCrankingEnrichment, "After start enrichment" + field = "Post-Cranking factor", postCrankingFactor + field = "Duration", postCrankingDurationSec + + dialog = primingFuelPulsePanel, "Priming fuel pulse" + field = "Duration at -40C degrees", startOfCrankingPrimingPulse + field = "Falloff temperature", primeInjFalloffTemperature + + +; Cranking->Cranking Settings + dialog = crankingDialog, "Cranking Settings" + field = "Cranking RPM limit", cranking_rpm + field = "Enable cylinder cleanup", isCylinderCleanupEnabled + field = "" + field = "Enable faster engine spin-up", isFasterEngineSpinUpEnabled + panel = primingFuelPulsePanel + panel = crankingFuel + panel = crankingIgnition + panel = crankingIAC + panel = postCrankingEnrichment + + dialog = EngineLoadAccelPanel, "Engine Load (alpha version)" + field = "Length", engineLoadAccelLength + field = "Accel threshold", engineLoadAccelEnrichmentThreshold + field = "Accel multiplier", engineLoadAccelEnrichmentMultiplier + field = "Decel threshold", engineLoadDecelEnleanmentThreshold + field = "Decel multiplier", engineLoadDecelEnleanmentMultiplier + + dialog = TpsAccelPanel, "TPS" + field = "Set 'Debug Mode' to see detailed 'TPS acceleration enrichment' diagnostics" + field = "Length", tpsAccelLength + field = "Accel Threshold", tpsAccelEnrichmentThreshold + field = "Decel Threshold", tpsDecelEnleanmentThreshold +; field = "Decel Multiplier", tpsDecelEnleanmentMultiplier + field = "#Accelerator Pump model:" + field = "Fraction Period", tpsAccelFractionPeriod + field = "Fraction Divisor", tpsAccelFractionDivisor + + dialog = WallWettingAccelPanel, "Wall Wetting (alpha version)" + field = "evaporation time constant / tau", wwaeTau + field = "added to wall coef / beta", wwaeBeta + + +; Tuning->AccelEnrichment + dialog = AccelEnrich, "Accel/Decel Enrichment" + panel = TpsAccelPanel + panel = WallWettingAccelPanel + panel = EngineLoadAccelPanel + field = "No accel after RPM hard limit", noAccelAfterHardLimitPeriodSecs + + +; Flex Logic + dialog = fsioIO, "Outputs" + field = "output #1", fsioOutputPins1 + field = "output #2", fsioOutputPins2 + field = "output #3", fsioOutputPins3 + field = "output #4", fsioOutputPins4 + field = "output #5", fsioOutputPins5 + field = "output #6", fsioOutputPins6 + field = "output #7", fsioOutputPins7 + field = "output #8", fsioOutputPins8 + field = "output #9", fsioOutputPins9 + field = "output #10", fsioOutputPins10 + field = "output #11", fsioOutputPins11 + field = "output #12", fsioOutputPins12 + field = "output #13", fsioOutputPins13 + field = "output #14", fsioOutputPins14 + field = "output #15", fsioOutputPins15 + field = "output #16", fsioOutputPins16 + field = "aux valve #1", auxValves1 + field = "aux valve #2", auxValves2 + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc + + dialog = fsioFrequency, "Frequency" + field = "freq #1", fsioFrequency1 + field = "freq #2", fsioFrequency2 + field = "freq #3", fsioFrequency3 + field = "freq #4", fsioFrequency4 + field = "freq #5", fsioFrequency5 + field = "freq #6", fsioFrequency6 + field = "freq #7", fsioFrequency7 + field = "freq #8", fsioFrequency8 + field = "freq #9", fsioFrequency9 + field = "freq #10", fsioFrequency10 + field = "freq #11", fsioFrequency11 + field = "freq #12", fsioFrequency12 + field = "freq #13", fsioFrequency13 + field = "freq #14", fsioFrequency14 + field = "freq #15", fsioFrequency15 + field = "freq #16", fsioFrequency16 + field = "" + field = "" + + dialog = fsioSetting, "Setting" + field = "Set number is not associated with the output number." + field = "Set number, only the cell number with some numbers." + field = "set #1", fsio_setting1 + field = "set #2", fsio_setting2 + field = "set #3", fsio_setting3 + field = "set #4", fsio_setting4 + field = "set #5", fsio_setting5 + field = "set #6", fsio_setting6 + field = "set #7", fsio_setting7 + field = "set #8", fsio_setting8 + field = "set #9", fsio_setting9 + field = "set #10", fsio_setting10 + field = "set #11", fsio_setting11 + field = "set #12", fsio_setting12 + field = "set #13", fsio_setting13 + field = "set #14", fsio_setting14 + field = "set #15", fsio_setting15 + field = "set #16", fsio_setting16 + + dialog = fsioOutputsDialog, "FSIO outputs", border + panel = fsioIO, West + panel = fsioFrequency, Center + panel = fsioSetting, East + + dialog = fsioFormulas, "FSIO Formulas" + field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" + field = "#1", fsioFormulas1 + field = "#2", fsioFormulas2 + field = "#3", fsioFormulas3 + + field = "use FSIO #4 for serious engine warning",useFSIO4ForSeriousEngineWarning + field = "#4", fsioFormulas4 + + field = "use FSIO #5 for critical engine stop", useFSIO5ForCriticalIssueEngineStop + field = "#5", fsioFormulas5 + + field = "use FSIO #6 for rev limiter", useFSIO6ForRevLimiter + field = "#6", fsioFormulas6 + + field = "#7", fsioFormulas7 + + field = "use FSIO #8 for servo #1", useFSIO8ForServo1 + field = "#8", fsioFormulas8 + field = "use FSIO #9 for servo #2", useFSIO9ForServo2 + field = "#9", fsioFormulas9 + field = "use FSIO #10 for servo #3", useFSIO10ForServo3 + field = "#10", fsioFormulas10 + field = "use FSIO #11 for servo #4", useFSIO11ForServo4 + field = "#11", fsioFormulas11 + field = "use FSIO #12 for servo #5", useFSIO12ForServo5 + field = "use FSIO #12 idle offset", useFSIO12ForIdleOffset + field = "#12", fsioFormulas12 + field = "use FSIO #13 idle min value", useFSIO13ForIdleMinValue + field = "#13", fsioFormulas13 + field = "#14", fsioFormulas14 + field = "use FSIO #15 for target idle RPM adjustment", useFSIO15ForIdleRpmAdjustment + field = "#15", fsioFormulas15 + field = "use FSIO #16 for timing adjustment", useFSIO16ForTimingAdjustment + field = "#16", fsioFormulas16 + + dialog = fsioInputsDialog, "FSIO inputs" + field = "ADC #1", fsioAdc1 + field = "ADC #2", fsioAdc2 + field = "ADC #3", fsioAdc3 + field = "ADC #4", fsioAdc4 + +;Boost Open Loop + + dialog = boost_left, "" + field = "Enable", isBoostControlEnabled + field = "Control Mode", boostType, { isBoostControlEnabled } + field = "Output", boostControlPin, { isBoostControlEnabled } + field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } + field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + + dialog = boostDialog, "", border + panel = boost_left, West + panel = boostTableTbl, Center + +;Boost Closed Loop + + dialog = boostPidleft, "" + field = "P Gain", boostPid_pFactor, { isBoostControlEnabled && boostType == 1 } + field = "I Gain", boostPid_iFactor, { isBoostControlEnabled && boostType == 1 } + field = "D Gain", boostPid_dFactor, { isBoostControlEnabled && boostType == 1 } + field = "Control Period", boostPid_periodMs, { isBoostControlEnabled && boostType == 1 } + field = "Min Duty", boostPid_minValue, { isBoostControlEnabled && boostType == 1 } + field = "Max Duty", boostPid_maxValue, { isBoostControlEnabled && boostType == 1 } + + dialog = boostTableDialog, "", card + panel = boostTable2Tbl + + dialog = boostPidDialog, "", border + panel = boostPidleft, West + panel = boostTableDialog, Center + + help = veTableDialogHelp, "Volumetric Efficiency" + text = "Volumetric Efficiency is used to calculate fuel in Speed Density mode" + webHelp = "https://rusefi.com/s/fuel" + + help = fuelHelp, "Fuel Control" + text = "More about fuel control on the web" + webHelp = "https://rusefi.com/s/fuel" + + help = etbHelp, "ETB Control" + text = "More about electronic throttle body on the web" + webHelp = "https://rusefi.com/s/etb" + + help = tpsTpsHelp, "Acceleration Enrichment" + text = "More about Tps To Tps acceleration on the web" + webHelp = "https://rusefi.com/s/tpstps" + + help = baseHelp, "Base Settings Control" + text = "More about rusefi on the web" + webHelp = "https://rusefi.com/" + + dialog = veTableDialog + topicHelp = "veTableDialogHelp" + panel = veTableTbl, South + + dialog = veTableDialog3D, "VE Table" + topicHelp = "veTableDialogHelp" + panel = veTableMap, South + + dialog = etbPidDialog, "PID settings" + field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} + field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} + field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} + field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} + field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} + field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} + field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange + + dialog = etbDialogLeft + field = "https://rusefi.com/s/etb" + field = "Detailed status in console", isVerboseETB + field = "Disable ETB Motor", pauseEtbControl + ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility + ; criteria for the same panel when used in multiple places + panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } + + dialog = etbAutotune, "PID Autotune" + commandButton = "Start ETB PID Autotune", cmd_etb_autotune + commandButton = "Stop ETB PID Autotune", cmd_etb_autotune_stop + + commandButton = "Auto Calibrate TPS", cmb_etb_auto_calibrate + + field = "!Set debug mode below to 'ETB Autotune' to show more detail" + field = "Debug mode", debugMode + + dialog = etbDialogRight + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition + + dialog = etbDialog, "Electronic Throttle Body (beta)", border + topicHelp = "etbHelp" + panel = etbDialogLeft, West + panel = etbDialogRight, East + + + dialog = testSpark, "Spark" + commandButton = "Spark #1", cmd_test_spk1 + commandButton = "Spark #2", cmd_test_spk2 + commandButton = "Spark #3", cmd_test_spk3 + commandButton = "Spark #4", cmd_test_spk4 + commandButton = "Spark #5", cmd_test_spk5 + commandButton = "Spark #6", cmd_test_spk6 + commandButton = "Spark #7", cmd_test_spk7 + commandButton = "Spark #8", cmd_test_spk8 + + dialog = testInjectors, "Fuel" + commandButton = "Injector #1", cmd_test_inj1 + commandButton = "Injector #2", cmd_test_inj2 + commandButton = "Injector #3", cmd_test_inj3 + commandButton = "Injector #4", cmd_test_inj4 + commandButton = "Injector #5", cmd_test_inj5 + commandButton = "Injector #6", cmd_test_inj6 + commandButton = "Injector #7", cmd_test_inj7 + commandButton = "Injector #8", cmd_test_inj8 + + dialog = testMisc, "Misc" +; commandButton = "Come To Pit", cmd_call_from_pit + commandButton = "Fuel Pump", cmd_test_fuel_pump + commandButton = "Radiator Fan", cmd_test_radiator_fan + commandButton = "Check Engine", cmd_test_check_engine_light + commandButton = "Idle Air Valve", cmd_test_idle_valve + commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay + commandButton = "Stop Engine", cmd_stop_engine + commandButton = "Write Config", cmd_write_config + commandButton = "Reset ECU", cmd_reset_controller + commandButton = "Reset to DFU", cmd_dfu + + ; bench test + dialog = ioTest, "Bench Test & Commands", border + panel = testSpark, West + panel = testInjectors, Center + panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + field = "!These buttons send a command to rusEfi controller to apply preset values" + field = "!Once you send the command, please reconnect to rusEfi controller in order to read fresh values" + commandButton = "Frankenso Miata NA6 Stage 0", cmd_set_engine_type_Frankenso_Miata_NA6_VAF@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NA6 Stage 1", cmd_set_engine_type_Frankenso_Miata_NA6_MAP@@if_show_Frankenso_presets + commandButton = "Frankenso Miata NB2 MAP", cmd_set_engine_type_Frankenso_Miata_NB2@@if_show_Frankenso_presets + + commandButton = "microRusEfi Miata NB2 MAP", cmd_set_engine_type_microRusEFI_Miata_NB2_MAP@@if_show_microRusEFI_presets + commandButton = "microRusEFI Miata NB2 MAF", cmd_set_engine_type_microRusEFI_Miata_NB2_MAF@@if_show_microRusEFI_presets + + commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets + + + commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets + commandButton = "TLE8888B test bench", cmd_set_engine_type_8888_test@@if_show_test_presets + commandButton = "Reset firmware settings", cmd_set_engine_type_default + field = "#Please DO NOT hit 'Burn' - just press a command button above and disconnect TunerStudio!" + + +; Board->ECU stimulator + dialog = ecuStimulator, "ECU stimulator" + field = "Trigger Simulator", triggerSimulatorFrequency + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim + commandButton = "Disable Internal Trigger Simulation", cmd_disable_self_stim + field = "" + field = "digipot spi", digitalPotentiometerSpiDevice + field = "digipot CS #0", digitalPotentiometerChipSelect1 + field = "digipot CS #1", digitalPotentiometerChipSelect2 + field = "digipot CS #2", digitalPotentiometerChipSelect3 + field = "digipot CS #3", digitalPotentiometerChipSelect4 + field = "" + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin mode #1", triggerSimulatorPinModes1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin mode #2", triggerSimulatorPinModes2 + field = "trigger stimulator pin #3", triggerSimulatorPins3 + field = "trigger stimulator pin mode #3", triggerSimulatorPinModes3 + field = "" + field = "Logic input channel 1", logicAnalyzerPins1 + field = "Logic input channel 2", logicAnalyzerPins2 + field = "Logic input channel 3", logicAnalyzerPins3 + field = "Logic input channel 4", logicAnalyzerPins4 + field = "" + field = "Engine chart size", engineChartSize + + dialog = datalogSettings, "Datalogging Settings" + field = "#Disabling optional logging may increase update rate!" + field = "Log debug channels", enableLogDebugChannels + field = "Log recent errors list", enableLogErrorList + + ; Racing Features->Launch Control + dialog = smLaunchControl, "Launch Control Settings NOT WORKING" + field = "Enable Launch Control", launchControlEnabled + field = "Activation Mode", launchActivationMode + field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1} + field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1} + field = "" + field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1} + field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1} + field = "" + field = "Launch RPM", launchRpm, {launchControlEnabled == 1} + field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1} + field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1} + field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1} + field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1} + field = "Smooth Retard Mode", launchSmoothRetard, {launchControlEnabled == 1} + field = "Hard Cut Mode" + field = "Ignition Cut", launchSparkCutEnable, {launchControlEnabled == 1} + field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1} + field = "Hard Cut RPM Range", hardCutRpmRange, {launchControlEnabled == 1} + + + + + ; Racing Features->Rolling Launch + dialog = smRollingLaunch, "Rolling Launch Settings NOT WORKING" + field = "Enable Rolling Launch", rollingLaunchEnabled + + ; Racing Features->Rolling Launch + dialog = antiLag, "AntiLag Settings NOT WORKING" + field = "Enable AntiLag", antiLagEnabled + field = "Activation Mode", antiLagActivationMode, {antiLagEnabled == 1} + field = "Switch Input", antiLagActivatePin, {antiLagActivationMode == 1 && antiLagEnabled == 1} + + + + dialog = coastingFuelCutControl, "Coasting Fuel Cutoff Settings" + field = "Enable Coasting Fuel Cutoff", coastingFuelCutEnabled + field = "Cutoff Activation RPM High Limit", coastingFuelCutRpmHigh, {coastingFuelCutEnabled == 1} + field = "Cutoff Deactivation RPM Low Limit", coastingFuelCutRpmLow, {coastingFuelCutEnabled == 1} + field = "TPS Deactivation Threshold", coastingFuelCutTps, {coastingFuelCutEnabled == 1} + field = "CLT Activation Threshold", coastingFuelCutClt, {coastingFuelCutEnabled == 1} + field = "MAP Deactivation Threshold", coastingFuelCutMap, {coastingFuelCutEnabled == 1} + + dialog = parkingLot, "Experimental/Broken" + field = "#System hacks" + field = "Global fuel correction", globalFuelCorrection + field = "Ignition Math Logic @", ignMathCalculateAtIndex + field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex + + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} + +[Tools] + ;addTool = toolName, PanelName + addTool = veTableGenerator, "VE Table Generator", veTableTbl + addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl + diff --git a/firmware/tunerstudio/cache/rusefi_config.txt b/firmware/tunerstudio/cache/rusefi_config.txt index e69de29bb2..5d8e17783b 100644 --- a/firmware/tunerstudio/cache/rusefi_config.txt +++ b/firmware/tunerstudio/cache/rusefi_config.txt @@ -0,0 +1,1676 @@ + +! this file defines the format of rusEfi persistent configuration structure +! this file is processed by ../java_tools/config_definition.jar tool +! comments start with '!' +! +! +! rusEfi configuration consists of two parts: +! First part is engine_configuration_s area, followed by a few tuning tables +! +! The only difference her is that engine_configuration_s area does not support hot modification while tuning tables could +! be modified without burning changes +! +! +! See also ../tunerstudio/readme.txt +! +! Q: How to add new fields? +! A: Find an 'unused' bit or unused int (usually the huge unusedEnd[] array at the end +! rename the bit or substitute unused integer with any new fields of the same size +! invoke gen_config.bat to apply the tools which would generate .h and .ini files +! +! +! each field is declared as +! type name;comment + + +#define TS_SIGNATURE "rusEFI v1.2020.4" + +! +! this is here so that rusEfi console can access it, too +! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above +! +#define TS_OUTPUT_SIZE 244 + +! +! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version +! so not forget to change fileVersion in rusefi.ini +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( +#define TS_FILE_VERSION 20200310 + + +! This is the version of the data stored in flash configuration +! Any time an incompatible change is made to the configuration format stored in flash, +! update this string to the current date! It is required to also update TS_SIGNATURE above +! when this happens. +#define FLASH_DATA_VERSION 10001 + +! all the sub-structures are going to be nested within the primary structure, that's +! needed to get a proper TunerStudio file + +struct persistent_config_s + +struct_no_prefix engine_configuration_s + +#define LE_COMMAND_LENGTH 200 + +! see 'blockingFactor' in rusefi.ini +#define BLOCKING_FACTOR 400 + +#define FSIO_ANALOG_INPUT_COUNT 4 + +#define CAM_INPUTS_COUNT 4 + +#define SERVO_COUNT 8 + +#define CONSOLE_DATA_PROTOCOL_TAG " @" + +#define ETB_BIAS_CURVE_LENGTH 8 + +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 + +#define IAC_PID_MULT_SIZE 8 + +#define NARROW_BAND_WIDE_BAND_CONVERSION_SIZE 8 + +#define CLT_CURVE_SIZE 16 +#define CRANKING_CLT_IDLE_CURVE_SIZE 8 +#define CLT_CRANKING_CURVE_SIZE 8 +#define IDLE_ADVANCE_CURVE_SIZE 8 +#define CRANKING_ADVANCE_CURVE_SIZE 4 + +#define ENGINE_NOISE_CURVE_SIZE 8 +#define CLT_TIMING_CURVE_SIZE 8 +#define IDLE_VE_CURVE_SIZE 8 + +#define TCU_SOLENOID_COUNT 8 + +#define ETB_COUNT 2 + +#define AUX_DIGITAL_VALVE_COUNT 2 + +#define IAT_CURVE_SIZE 16 + +#define VBAT_INJECTOR_CURVE_SIZE 8 + +#define DWELL_CURVE_SIZE 8 + +#define CRANKING_CURVE_SIZE 8 + +#define IGN_LOAD_COUNT 16 +#define IGN_TPS_COUNT 16 +#define IGN_RPM_COUNT 16 + +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define EGT_CHANNEL_COUNT 8 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 17 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define TRIGGER_INPUT_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define FSIO_COMMAND_COUNT 16 +#define AUX_PID_COUNT 4 + +#define VEHICLE_INFO_SIZE 32 + +#define FUEL_RPM_COUNT 16 +#define FUEL_LOAD_COUNT 16 + +#define BOOST_RPM_COUNT 8 +#define BOOST_LOAD_COUNT 8 +#define PEDAL_TO_TPS_SIZE 8 + +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + + +! +! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte +! or packing numeric voltage inside an integer byte +! See usages of '@@RPM_1_BYTE_PACKING_MULT@@' where we apply the TS part of the magic +! +#define RPM_1_BYTE_PACKING_MULT 50 +#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 + +! These are used currently only for output channels - but could be for config as well +#define PACK_MULT_PRESSURE 30 +#define PACK_MULT_PERCENT 100 +#define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 +#define PACK_MULT_MS 300 +#define PACK_MULT_AFR 1000 +#define PACK_MULT_ANGLE 50 +#define PACK_MULT_VOLTAGE 1000 +#define TPS_1_BYTE_PACKING_MULT 2 +#define LOAD_1_BYTE_PACKING_MULT 2 +#define FSIO_TABLE_8 8 + +#define FSIO_CURVE_8 8 +#define FSIO_CURVE_16 16 + +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + +#define TPS_TPS_ACCEL_TABLE 8 +#define MAP_ACCEL_TAPER 8 +#define ADC_CHANNEL_NONE 16 + +#define BARO_CORR_SIZE 4 + +#define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 + +custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 +custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 +custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", 0.1, 0, 0, 25.0, 1 + +custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 +custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 +custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2 + + +custom baro_corr_table_t 4*@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@ array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"ratio", 1, 0, 0, 2.0, 2 + + +custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -20, 90, 2 +custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 + +custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 + +custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 +custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 +#define GPPWM_CHANNELS 4 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + +struct pid_s + float pFactor;;"", 1, 0, -10000, 10000, 4 + float iFactor;;"", 1, 0, -10000, 10000, 4 + float dFactor;;"", 1, 0, -10000, 10000, 4 + int16_t fsio_visible offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 + int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 + int16_t fsio_visible minValue;Output min value;"", 1, 0, -30000, 30000.0, 0 + int16_t maxValue;Output max value;"", 1, 0, -30000, 30000.0, 0 +end_struct + +#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" +custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ + +struct cranking_parameters_s +float baseFuel;+Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.;"ms", 1, 0, 0, 200, 1 +int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 +end_struct + +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" +custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@ + +#define vvt_mode_e_enum "Inactive", "Second half", "2GZ", "Miata NB2", "First half", "mode5", "mode6", "mode7" +custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:2], @@vvt_mode_e_enum@@ + +#define mass_storage_e_enum "Auto", "Always", "Never", "INVALID" +custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@ + +! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU +! todo: as of ChibiOS3, only channels 1 & 2 are allowed to capture input, that's a ChibiOS driver limitation +! https://github.com/ChibiOS/ChibiOS-Drivers/blob/master/inc/timcap_driver.h is an alternative driver if channels 3 & 4 really become an issue +! todo: only one channel per timer is allowed for capture simultaneously, that's an STM32 limitation +! todo: convert slow ADC to software scheduler and make TIM8 available +! todo: maybe convert fast ADC to software scheduler as well? less sure about that + +#define brain_input_pin_e_enum "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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", "INVALID", "INVALID", "INVALID" +custom brain_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ + +! +! 'brain_pin_e' is the most flexible kind of pin +! 'output_pin_e' is a brain pin known to be routed to control an output on your specific board +! 'brain_input_pin_e' is XXX +! 'switch_input_pin_e' is YYY +! + +#define brain_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" +#define switch_input_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","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" + +custom brain_pin_e 1 bits, U08, @OFFSET@, [0:7], @@brain_pin_e_enum@@ +custom switch_input_pin_e 1 bits, U08, @OFFSET@, [0:7], @@switch_input_pin_e_enum@@ + +#define output_pin_e_enum "NONE", "INVALID", "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", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom output_pin_e 1 bits, U08, @OFFSET@, [0:7], @@output_pin_e_enum@@ + + + + +#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted" +custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@ + +custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1 + +struct spi_pins + brain_pin_e mosiPin; + brain_pin_e misoPin; + brain_pin_e sckPin; +end_struct + + +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" + +! +! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress +! +#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@ + +struct air_pressure_sensor_config_s +float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2 +float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2 +air_pressure_sensor_type_e type; +adc_channel_e hwChannel; +uint8_t[3] align; + +end_struct + +struct MAP_sensor_config_s @brief MAP averaging configuration +float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_ANGLE_SIZE] samplingAngle;@brief MAP averaging sampling start angle, by RPM;"deg", 1, 0, -720, 720, 2 +float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0.0, 18000, 2 +float[MAP_WINDOW_SIZE] samplingWindow;@brief MAP averaging angle duration, by RPM;"deg", 1, 0, -720, 720, 2 +air_pressure_sensor_config_s sensor +end_struct + +struct_no_prefix thermistor_conf_s @brief Thermistor known values +float tempC_1;these values are in Celcius;"*C", 1, 0, -40, 200, 1 +float tempC_2;;"*C", 1, 0, -40, 200, 1 +float tempC_3;;"*C", 1, 0, -40, 200, 1 +float resistance_1;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_2;;"Ohm", 1, 0, 0, 200000, 1 +float resistance_3;;"Ohm", 1, 0, 0, 200000, 1 + + float bias_resistor;+Pull-up resistor value on your board;"Ohm", 1, 0, 0, 200000, 1 +end_struct + +struct oil_pressure_config_s @brief Oil pressure sensor interpolation + adc_channel_e hwChannel; + uint8_t[3] align; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "kPa", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "kPa", 1, 0.0, 0, 1000.0, 2 +end_struct + +struct ThermistorConf @brief Thermistor curve parameters + thermistor_conf_s config; + adc_channel_e adcChannel; +end_struct + +custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" +engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X + +int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0 + +struct injector_s + float flow;+This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 + +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0.0, 20.0, 2 +float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0.0, 50.0, 2 + +end_struct + + +injector_s injector + + +bit isForcedInduction; +bit activateAuxPid1; +bit isVerboseAuxPid1; +bit activateAuxPid2; +bit isVerboseAuxPid2; +bit activateAuxPid3; +bit isVerboseAuxPid3; +bit activateAuxPid4; +bit isVerboseAuxPid4; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose +bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt +bit cj125isLsu49; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. +bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. +bit showSdCardWarning; +bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. +bit issue_294_unused; +bit useTLE8888_cranking_hack; +bit useInstantRpmForIdle; +bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line +bit launchControlEnabled; +bit rollingLaunchEnabled; +bit antiLagEnabled; +bit useRunningMathForCranking,Fuel Map,Fixed; +bit displayLogicLevelsInEngineSniffer; +bit issue_294_26; +bit issue_294_27; +bit issue_294_28; +bit issue_294_29; +bit issue_294_30; +bit issue_294_31,si_example,nada_example; + + +int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 + +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 + +cranking_parameters_s cranking +float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 + float ignitionDwellForCrankingMs;Used if useConstantDwellDuringCranking is TRUE;"ms", 1, 0, 0, 200, 1 +float crankingChargeAngle;+While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X;"deg", 1, 0, 0, 3000.0, 0 + + +MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled + + +ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! +ThermistorConf iat; + + int launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", 1, 0, 0, 20000.0, 2 + int launchTimingRetard;;"deg", 1, 0, -180, 180, 2 + int hip9011PrescalerAndSDO;+value '6' for 8MHz hw osc\nread hip9011 datasheet for details\ntodo split into two bit fields;"integer", 1, 0.0, 0.0, 32, 0 + float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0.0, 0.0, 10.0, 2 + + +float[DWELL_CURVE_SIZE] sparkDwellRpmBins;On single-coil or wasted spark setups you have to lower dwell at high RPM;"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 litres\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2 + +custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" +cylinders_count_t cylindersCount; + +! see firing_order.h +! FO_1 = 0 +! FO_1_3_2_4 = 3 +! FO_1_8_4_3_6_5_7_2 = 5 +! FO_1_2_4_5_3 = 6 + +custom firing_order_e 4 bits, U32, @OFFSET@, [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", "1-7-4-10-2-8-6-12-3-9-5-11", "1-4-3-2", "1-12-5-8-3-10-6-7-2-11-4-9", "1-2-7-8-4-5-6-3", "1-3-7-2-6-5-4-8", "1-2-3-4-5-6-7-8-9", "INVALID", "1-2-3-4-5-6-7-8-9-10-11-12", "1-3-2", "INVALID", "INVALID" +firing_order_e firingOrder; +end_struct + + specs_s specs + float cylinderBore;+Cylinder diameter, in mm.;"mm", 1, 0, 0, 20000.0, 2 +int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", 1, 0, 0,30000, 0 + int rpmHardLimit;set rpm_hard_limit X;"rpm", 1, 0, 0, 20000.0, 2 + + +#define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "INVALID", "SPEED DENSITY", "MAF Air Charge", "INVALID", "INVALID" + + +custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ +engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nSee also useTPSAdvanceTable\nset algorithm X + + +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" +injection_mode_e crankingInjectionMode;+This is the injection strategy during engine start. See Fuel/Injection settings for more detail. It is suggested to use "Simultaneous". +injection_mode_e injectionMode;+This is where the fuel injection type is defined: "Simultaneous" means all injectors will fire together at once. "Sequential" fires the injectors on a per cylinder basis, which requires individually wired injectors. "Batched" will fire the injectors in groups. If your injectors are individually wired you will also need to enable "Two wire batch emulation". \nset injection_mode X\nSee also twoWireBatchInjection +angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2 +angle_t crankingTimingAngle;+Ignition advance angle used during engine cranking, 5-10 degrees will work as a base setting for most engines.\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2 + +custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "Two distributors" +ignition_mode_e ignitionMode;+"One Coil" is for use on distributed ignition system. "Individual Coils" is to be used when you have one coil per cylinder (COP or similar). "Wasted" means one coil is driving two spark plugs in two cylinders, with one of the sparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X + +angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0 + +custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed" +timing_mode_e timingMode;+Dynamic uses the timing map to decide the ignition timing, Static timing fixes the timing to the value set below (only use for checking static timing). + +angle_t fixedModeTiming;+This value is the ignition timing used when in 'fixed timing' mode, i.e. constant timing\nThis mode is useful when adjusting distributor location.;"RPM", 1, 0, 0, 3000.0, 0 + +angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0 + + + +float analogInputDividerCoefficient;+Ratio/coefficient of input voltage dividers on your PCB. For example, use '2' if your board divides 5v into 2.5v. Use '1.66' if your board divides 5v into 3v.;"coef", 1, 0, 0.01, 10.0, 2 +float vbattDividerCoeff;+This is the ratio of the resistors for the battery voltage, measure the voltage at the battery and then adjust this number until the gauge matches the reading.;"coef", 1, 0, 0.01, 99.0, 2 + +float fsio_visible fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 +float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"*C", 1, 0, 0, 1000.0, 0 + + +float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 + +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:3], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202", "BMW E90", "INVALID", "INVALID" +can_nbc_e canNbcType;set can_mode X + +int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 + + +custom operation_mode_e 4 bits, U32, @OFFSET@, [0:2], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" +operation_mode_e ambiguousOperationMode;+'Some triggers could be mounted differently. Most well-known triggers imply specific sensor setup. 4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2\nSee engineCycle\nset operation_mode X + +custom display_mode_e 4 bits, U32, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" +display_mode_e displayMode; + +custom log_format_e 4 bits, U32, @OFFSET@, [0:0], "native", "Mega Log Viewer" +log_format_e logFormat; + int byFirmwareVersion;;"index", 1, 0, 0, 300, 0 + int HD44780width;;"index", 1, 0, 0, 300, 0 + int HD44780height;;"index", 1, 0, 0, 300, 0 + + adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel +adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. +adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X + + int unusedAt516; + int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 + +struct trigger_config_s @brief Trigger wheel(s) configuration + + +custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" + +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "trg50", "INVALID" + +custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ + trigger_type_e type;set trigger_type X + + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; + bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken + + int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 + int customSkippedToothCount;;"number", 1, 0.0, 0, 500.0, 0 +end_struct + +trigger_config_s trigger; + +custom spi_device_e 1 bits,U32, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" + spi_device_e hip9011SpiDevice; + adc_channel_e high_fuel_pressure_sensor_1; + adc_channel_e high_fuel_pressure_sensor_2; + adc_channel_e mafAdcChannel;See hasMafSensor + + +float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 + + float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 + brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 + +struct afr_sensor_s + adc_channel_e hwChannel; +uint8_t[3] alignAf; + float v1;; "volts", 1, 0.0, 0, 10.0, 2 + float value1;; "AFR", 1, 0.0, 0, 1000.0, 2 + float v2;; "volts", 1, 0.0, 0, 10.0, 2 + float value2;; "AFR", 1, 0.0, 0, 1000.0, 2 +end_struct + +afr_sensor_s afr + +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X + brain_pin_e tle6240_cs; + pin_output_mode_e tle6240_csPinMode; + +switch_input_pin_e throttlePedalUpPin;+Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata + + +air_pressure_sensor_config_s baroSensor;@see hasBaroSensor + +struct idle_hardware_s + int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0 + + output_pin_e solenoidPin; + brain_pin_e stepperDirectionPin; + brain_pin_e stepperStepPin; + pin_output_mode_e solenoidPinMode; +end_struct + +struct etb_io + brain_pin_e directionPin1; + brain_pin_e directionPin2; + brain_pin_e controlPin1; + brain_pin_e disablePin; +end_struct + + idle_hardware_s idle; + + float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 + +float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 +float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 + +! todo: rename to triggerSimulatorRpm + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + + output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; + output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; + + pin_output_mode_e injectionPinMode; + pin_output_mode_e ignitionPinMode; + brain_pin_e HD44780_rs; + brain_pin_e HD44780_e; + + brain_pin_e HD44780_db4; + brain_pin_e HD44780_db5; + brain_pin_e HD44780_db6; + brain_pin_e HD44780_db7; + + brain_pin_e gps_rx_pin; + brain_pin_e gps_tx_pin; + output_pin_e fuelPumpPin; + pin_output_mode_e fuelPumpPinMode; + + output_pin_e malfunctionIndicatorPin;+Check engine light, also malfunction indicator light. Always blinks once on boot. + pin_output_mode_e malfunctionIndicatorPinMode; + pin_output_mode_e fanPinMode; + output_pin_e fanPin; + +switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down + output_pin_e alternatorControlPin; + pin_output_mode_e alternatorControlPinMode; + pin_input_mode_e clutchDownPinMode; + + brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; + pin_output_mode_e electronicThrottlePin1Mode; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX + spi_device_e max31855spiDevice; + brain_pin_e debugTriggerSync; + +spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code + brain_pin_e mc33972_cs; + pin_output_mode_e mc33972_csPinMode; + + +custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" + + adc_channel_e auxFastSensor1_adcChannel;Useful in Research&Development phase + adc_channel_e tps1_2AdcChannel;First throttle body, second sensor. + adc_channel_e tps2_2AdcChannel;Second throttle body, second sensor. + adc_channel_e throttlePedalPositionSecondAdcChannel;Electronic throttle pedal position input\nSecond channel\nSee also tps1_1AdcChannel + + + + float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2 + float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2 + + ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; + uint32_t unused696; + + brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; + pin_output_mode_e hip9011CsPinMode; + output_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin. + pin_output_mode_e tachOutputPinMode; + + output_pin_e mainRelayPin; + brain_pin_e sdCardCsPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X + +pin_input_mode_e throttlePedalUpPinMode; + uint8_t unused711; + + int unusedAt712; + int unusedAt716; + int unusedAt720; + int unusedAt724; + + uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 + + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 + + brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. + pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; + output_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin + pin_output_mode_e o2heaterPinModeTodO; + + +bit is_enabled_spi_1 +bit is_enabled_spi_2 + bit is_enabled_spi_3 + bit isSdCardEnabled + bit isFastAdcEnabled + bit isEngineControlEnabled + bit isHip9011Enabled + bit isVerboseAlternator + bit useSerialPort + bit useStepperIdle;+This setting should only be used if you have a stepper motor idle valve and a stepper motor driver installed. + + bit enabledStep1Limiter; + bit useTpicAdvancedMode; + bit useLcdScreen; + bit verboseTLE8888; + bit enableVerboseCanTx;+CAN broadcast using custom rusEFI protocol\nenable can_broadcast/disable can_broadcast + bit onOffAlternatorLogic;+This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. + bit isCJ125Enabled;enable cj125/disable cj125 + bit vvtCamSensorUseRise;+Use rise or fall signal front + bit measureMapOnlyInOneCylinder;+Useful for individual intakes + bit stepperForceParkingEveryRestart + bit isFasterEngineSpinUpEnabled;+Smarter cranking logic.\nSee also startOfCrankingPrimingPulse + bit coastingFuelCutEnabled;+This setting disables fuel injection while the engine is in overrun, this is useful as a fuel saving measure and to prevent back firing. + bit useIacTableForCoasting;+This setting allows the ECU to open the IAC during overrun conditions to help reduce engine breaking, this can be helpful for large engines in light weight cars. + bit useNoiselessTriggerDecoder + bit useIdleTimingPidControl + bit useTPSBasedVeTable + bit is_enabled_spi_4 + bit pauseEtbControl;+Disable the electronic throttle motor for testing.\nThis mode is for testing ETB position sensors, etc without actually driving the throttle. + bit alignEngineSnifferAtTDC + bit useETBforIdleControl;+This setting allows the ETB to act as the idle air control valve and move to regulate the airflow at idle. + bit idleIncrementalPidCic + bit enableAemXSeries +! 'enableAemXSeries' is the 32nd bit here, you would need another bit region if more bits are desired + + brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; + pin_output_mode_e mainRelayPinMode; + brain_pin_e hip9011CsPin; + brain_pin_e hip9011IntHoldPin; +pin_output_mode_e hip9011IntHoldPinMode; + + ! 536870911 = 2^29-1, the maximum valid extended ID + uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 + + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; + + + pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; + output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments + brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs; + + + +custom uart_device_e 1 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" + int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 + uint8_t unused806 + brain_pin_e debugMapAveraging; + output_pin_e starterRelayDisablePin; + pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running + brain_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve + switch_input_pin_e startStopButtonPin;See also starterControlPin + + int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 + int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 + int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 + + brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high + pin_output_mode_e triggerErrorPinMode; + output_pin_e acRelayPin; + pin_output_mode_e acRelayPinMode; + +custom pid_dt 4 scalar, U32, @OFFSET@, "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[FSIO_COMMAND_COUNT iterate] fsioFrequency; + + +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 2 + fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting; + +! todo: migrate to spi_pins & combine with spi pin modes + brain_pin_e spi1mosiPin; + brain_pin_e spi1misoPin; + brain_pin_e spi1sckPin; + brain_pin_e spi2mosiPin; + + brain_pin_e spi2misoPin; + brain_pin_e spi2sckPin; + brain_pin_e spi3mosiPin; + brain_pin_e spi3misoPin; + + brain_pin_e spi3sckPin; + brain_pin_e cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module + brain_pin_e joystickCenterPin; + brain_pin_e joystickAPin; + + brain_pin_e joystickBPin; + brain_pin_e joystickCPin; + brain_pin_e joystickDPin; + uart_device_e consoleUartDevice; + + +#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1", "INVALID", "INVALID" +custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ +sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode + + +#define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" +custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ + + + maf_sensor_type_e mafSensorType; + +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom vehicle_info_t @@VEHICLE_INFO_SIZE@@ string, ASCII, @OFFSET@, @@VEHICLE_INFO_SIZE@@ + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ + brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; + + brain_input_pin_e vehicleSpeedSensorInputPin; + switch_input_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up + brain_input_pin_e frequencyReportingMapInputPin; + pin_input_mode_e clutchUpPinMode; + uint16_t multisparkMaxRpm;;"rpm", 1, 0, 0, 3000, 0 + uint8_t multisparkMaxSparkingAngle;;"deg", 1, 0, 0, 60, 0 + uint8_t multisparkMaxExtraSparkCount;;"count", 1, 0, 0, 5, 0 + bit todoClutchUpPinInverted + bit todoClutchDownPinInverted + bit useHbridges;+If enabled we use two H-bridges to drive stepper idle air valve + bit multisparkEnable + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning + bit stftIgnoreErrorMagnitude;+If enabled, adjust at a constant rate instead of a rate proportional to the current lambda error. This mode may be easier to tune, and more tolerant of sensor noise. Use of this mode is required if you have a narrowband O2 sensor.; + bit unusedBit_251_11 + bit unusedBit_251_12 + bit unusedBit_251_13 + bit unusedBit_251_14 + bit unusedBit_251_15 + bit unusedBit_251_16 + bit unusedBit_251_17 + bit unusedBit_251_18 + bit unusedBit_251_19 + bit unusedBit_251_20 + bit unusedBit_251_21 + bit unusedBit_251_22 + bit unusedBit_251_23 + bit unusedBit_251_24 + bit unusedBit_251_25 + bit unusedBit_251_26 + bit unusedBit_251_27 + bit unusedBit_251_28 + bit unusedBit_251_29 + + etb_io[ETB_COUNT iterate] etbIo + + + output_pin_e boostControlPin; + pin_output_mode_e boostControlPinMode; + switch_input_pin_e antiLagActivatePin; + switch_input_pin_e launchActivatePin; + + pid_s boostPid; + custom boostType_e 4 bits, U32, @OFFSET@, [0:0], "Open Loop", "Closed Loop" + boostType_e boostType; + int boostPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + + #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" + custom launchActivationMode_e 4 bits, S32, @OFFSET@, [0:1], @@launchActivationMode_e_enum@@ + launchActivationMode_e launchActivationMode; + + #define antiLagActivationMode_e_enum "Always Active", "Switch Input" + custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ + antiLagActivationMode_e antiLagActivationMode; + + int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300.0, 0 + int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000.0, 0 + int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000.0, 0 + int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 + int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 + int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; + + stft_s stft + + etb_io[ETB_COUNT iterate] etbIo2 + + vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online + vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online + vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online + + output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid; + + + int[65] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 + + bit unusedHereWeHave + bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. + bit isVerboseIAC;+Print details into rusEfi console + bit isVerboseETB;+Prints ETB details to rusEFI console + bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. + bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price + bit silentTriggerError;+Sometimes we have a performance issue while printing error + bit useLinearCltSensor + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write + bit useLinearIatSensor + bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment + bit tachPulseDurationAsDutyCycle + bit isAlternatorControlEnabled;+This enables smart alternator control and activates the extra alternator settings. + bit invertPrimaryTriggerSignal;+This setting flips the signal from the primary engine speed sensor. + bit invertSecondaryTriggerSignal;+This setting flips the signal from the secondary engine speed sensor. + +bit cutFuelOnHardLimit +bit cutSparkOnHardLimit +bit launchFuelCutEnable +bit launchSparkCutEnable;+This is the Cut Mode normally used +bit hasFrequencyReportingMapSensor; + bit useFSIO8ForServo1 + bit useFSIO9ForServo2 + bit useFSIO10ForServo3 + bit useFSIO11ForServo4 + bit useFSIO12ForServo5 +bit useFSIO15ForIdleRpmAdjustment; +bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine down. Use carefully! +bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention +bit useFSIO12ForIdleOffset; +bit useFSIO13ForIdleMinValue; +bit useFSIO6ForRevLimiter; + + adc_channel_e hipOutputChannel; + adc_channel_e acSwitchAdc;A/C button input handled as analogue input + adc_channel_e vRefAdcChannel; + uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 + +custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual" + idle_mode_e idleMode;See also idleRpmPid; + + bit isInjectionEnabled;+Enable fuel injection - This is default off for new projects as a safety feature, set to "true" to enable fuel injection and further injector settings. + bit isIgnitionEnabled;+Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings. + bit isCylinderCleanupEnabled;+When enabled if TPS is held above 95% no fuel is injected while cranking to clear excess fuel from the cylinders. + bit secondTriggerChannelEnabled + bit unusedBit4_1476 + bit isMapAveragingEnabled + bit overrideCrankingIacSetting;+This setting overrides the normal multiplication values that have been set for the idle air control valve during cranking. If this setting is enabled the "IAC multiplier" table in the Cranking settings tab needs to be adjusted appropriately or potentially no IAC opening will occur. + bit useSeparateAdvanceForIdle;+This activates a separate ignition timing table for idle conditions, this can help idle stability by using ignition retard and advance either side of the desired idle speed. Extra retard at low idle speeds will prevent stalling and extra advance at high idle speeds can help reduce engine power and slow the idle speed. + bit isTunerStudioEnabled + bit isWaveAnalyzerEnabled + bit useSeparateVeForIdle;+This activates a separate fuel table for Idle, this allows fine tuning of the idle fuelling. + bit verboseTriggerSynchDetails;+enable trigger_details + bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatchInjection;+This is needed if your coils are individually wired and you wish to use batch injection.\nenable two_wire_batch_injection + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front + bit twoWireBatchIgnition;+This is needed if your coils are individually wired (COP) and you wish to use batch ignition (wasted spark). +bit useFixedBaroCorrFromMap +bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant. +bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle). +bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode +bit unused1476b20; +bit useIacPidMultTable;+This flag allows to use a special 'PID Multiplier' table (0.0-1.0) to compensate for nonlinear nature of IAC-RPM controller +bit isBoostControlEnabled; +bit launchSmoothRetard;+Interpolates the Ignition Retard from 0 to 100% within the RPM Range +bit unused_1484_bit_24 +bit unused_1484_bit_25 +bit unused_1484_bit_26 +bit unused_1484_bit_27 +bit unused_1484_bit_28 +bit unused_1484_bit_29 +bit unused_1484_bit_30 +bit unused_1484_bit_31 + + uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0 + + + int16_t idlePidRpmUpperLimit;+Relative to the target idle RPM;"RPM", 1, 0, 0, 9000, 0 + int16_t primeInjFalloffTemperature;+This sets the temperature above which no priming pulse is used, The value at -40 is reduced until there is no more priming injection at this temperature.;"*C", 1, 0, 0, 1000.0, 0 + + + int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +// todo: start using these parameters! + int16_t acCutoffLowRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acCutoffHighRpm;;"RPM", 1, 0, 1, 15000, 0 + int16_t acIdleRpmBump;;"RPM", 1, 0, 1, 15000, 0 + + + int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0 + + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 + + +float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 + float knockVThreshold;;"V", 1, 0, 1, 5, 2 + + pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes; + + int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0 + +float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0 + +int mapAveragingSchedulingAtIndex;+At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0 + +float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200, 2 +float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + +baro_corr_table_t baroCorrTable; + + #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" +custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ + + + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"Ratio", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 + + float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 + int tachPulseTriggerIndex;+Trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0 + + float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0.0, 3.0, 2 + pid_s alternatorControl; + pid_s etb; + float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 +int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 +int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 + output_pin_e starterControlPin;See also startStopButtonPin + pin_input_mode_e startStopButtonMode; + brain_pin_e mc33816_flag0; + uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 + +! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle + float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 + float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2 + uint16_t multisparkSparkDuration;; "ms", 0.001, 0, 0, 3, 2 + uint16_t multisparkDwell;; "ms", 0.001, 0, 0, 3, 2 + pid_s idleRpmPid;See cltIdleRpmBins + float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 + + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. + brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN + brain_pin_e binarySerialRxPin; + + brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves + switch_input_pin_e tcuUpshiftButtonPin + switch_input_pin_e tcuDownshiftButtonPin + + + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 + + float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + int16_t fsio_visible startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 + int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction;"RPM", 1, 0, 0, 1000, 0 + + + float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 + float[CLT_CURVE_SIZE] cltIdleRpm;See idleRpmPid;"", 1, 0, 0.0, 8000.0, 0 + + float targetVBatt;+This is the target battery voltage the alternator PID control will attempt to maintain;"Volts", 1, 0, 0,30, 1 + float alternatorOffAboveTps;+Turns off alternator output above specified TPS, enabling this reduced parasitic drag on the engine at full load.;"%", 1, 0, 0, 200, 2 + float startOfCrankingPrimingPulse;+Prime pulse for cold engine, duration in ms\nLinear interpolation between -40F/-40C and fallout temperature\n\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X;"ms", 1, 0, 0, 200, 1 + int16_t afterCrankingIACtaperDuration;+This is the duration in cycles that the IAC will take to reach its normal idle position, it can be used to hold the idle higher for a few seconds after cranking to improve startup.;"cycles", 1, 0, 0, 5000, 0 + + int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 + + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; + brain_pin_e warningLedPin; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; + brain_pin_e LIS302DLCsPin; + + + int tpsAccelLength;+This is the number of engine cycles that the TPS position change can occur over, a longer duration will make the enrichment more active but too long may affect steady state driving, a good default is 30-60 cycles. ;"cycles", 1, 0, 1, 200, 0 + float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 3 + float vvtOffset;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 + + int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0 + + float engineLoadDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 + float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + + + + uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0,1000000, 0 + float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3 + float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3 + float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 + debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X + + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + float throttlePedalSecondaryUpVoltage;;"voltage", 1, 0, -6, 6, 2 + float throttlePedalSecondaryWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 + + #define can_baudrate_e_enum "100kbps", "250kbps" , "500kbps", "1Mbps" + custom can_baudrate_e 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@ + can_baudrate_e canBaudRate; set can_baudrate + + uint32_t[5] unused_former_warmup_target_afr; + + float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 + +float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 +float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 + + adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs + float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 + 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 + + output_pin_e[AUX_PID_COUNT iterate] auxPidPins; + + spi_device_e cj125SpiDevice; + pin_output_mode_e cj125CsPinMode; + output_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin + pin_output_mode_e dizzySparkOutputPinMode; + + int crankingIACposition;+This is the IAC position during cranking, some engines start better if given more air during cranking to improve cylinder filling.;"percent", 1, 0, -100.0, 100, + float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4 + float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4 + + fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency; + int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0 + mass_storage_e storageMode; + + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 + float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 + vvt_mode_e vvtMode;set vvt_mode X + uint8_t[20] unusedOldBiquad + float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 + float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; + float autoTuneCltThreshold; + float autoTuneTpsRocThreshold; + float autoTuneTpsQuietPeriod; + float unused2432; + float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 0, 100, 4 + float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 100, 2 + ThermistorConf auxTempSensor1;todo: finish implementation #332 + ThermistorConf auxTempSensor2;todo: finish implementation #332 + uint8_t[6] unused2508; + int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0 + uint8_t[24] unused2516; + + 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;per-cylinder timing correction + + + float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 + + spi_device_e sdCardSpiDevice; + uint8_t[3] unusedSpiPadding4; + + pin_mode_e spi1SckMode; + pin_mode_e spi1MosiMode;+Modes count be used for 3v<>5v integration using pull-ups/pull-downs etc. + pin_mode_e spi1MisoMode; + + pin_mode_e spi2SckMode; + pin_mode_e spi2MosiMode; + pin_mode_e spi2MisoMode; + + pin_mode_e spi3SckMode; + pin_mode_e spi3MosiMode; + pin_mode_e spi3MisoMode; + + pin_output_mode_e stepperEnablePinMode; + brain_pin_e mc33816_rstb;ResetB + brain_pin_e mc33816_driven + + switch_input_pin_e brakePedalPin;Brake pedal switch + adc_channel_e cj125ua;lambda input + adc_channel_e cj125ur;heater input + pin_input_mode_e brakePedalPinMode; + + + pid_s[AUX_PID_COUNT iterate] auxPid; + + oil_pressure_config_s oilPressure; + + spi_device_e accelerometerSpiDevice; + adc_channel_e auxVoltage1; + adc_channel_e auxVoltage2; + uint8_t[1] unusedSpiPadding5; + float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_16] fsioCurve2;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3 + float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3 + + uint8_t unusedFlexFuelSensor;For pinout see https://rusefi.com/forum/viewtopic.php?f=5&t=1324 + brain_pin_e test557pin + pin_output_mode_e stepperDirectionPinMode; + adc_channel_e externalKnockSenseAdc; + brain_pin_e stepperEnablePin; + brain_pin_e tle8888_cs; + pin_output_mode_e tle8888_csPinMode; + brain_pin_e mc33816_cs; + +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2 +float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 + + brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments + + int16_t coastingFuelCutRpmHigh;+This sets the RPM limit above which the fuel cut is deactivated, activating this maintains fuel flow at high RPM to help cool pistons;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutRpmLow;+This sets the RPM limit below which the fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 + int16_t coastingFuelCutTps;+percent between 0 and 100 below which the fuel cut is deactivated, this helps low speed drivability.;"%", 1, 0, 0, 100, 1 + int16_t coastingFuelCutClt;+Fuel cutoff is deactivated below this coolant threshold.;"C", 1, 0, -100, 100, 0 + + int16_t pidExtraForLowRpm;+Increases PID reaction for RPM + + + + + + RUSEFI + 0 + OPEN_SR5_0.1 + RUSEFI + rusEfi + rusEfi + @@TOTAL_CONFIG_SIZE@@ + + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+ + +
+ \ No newline at end of file diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 7ae11e40a3..c94da09ca1 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 22:18:29 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index b82238598d..0ebbad28ff 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 18:35:37 UTC 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:21 UTC 2020 pageSize = 20000 page = 1 @@ -1195,6 +1195,7 @@ page = 1 injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." + isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." @@ -1408,7 +1409,6 @@ page = 1 ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" - ; recordDef = headerLen, footerLen, recordLen recordDef = 0, 0, 5 @@ -3249,6 +3249,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "MIL / Check Engine Pin", malfunctionIndicatorPin field = "test557pin", test557pin field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin field = "Main Relay Pin", mainRelayPin field = "Starter Relay Pin", starterRelayDisablePin @@ -3633,6 +3634,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Pin mode", fanPinMode field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index 70c759b3e9..1d7572f3dd 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri Jun 26 13:10:23 UTC 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Sun Jun 28 14:03:24 UTC 2020 pageSize = 20000 page = 1 @@ -1195,6 +1195,7 @@ page = 1 injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." + isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." @@ -1408,7 +1409,6 @@ page = 1 ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" - ; recordDef = headerLen, footerLen, recordLen recordDef = 0, 0, 5 @@ -3250,6 +3250,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "MIL / Check Engine Pin", malfunctionIndicatorPin field = "test557pin", test557pin field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin field = "Main Relay Pin", mainRelayPin field = "Starter Relay Pin", starterRelayDisablePin @@ -3634,6 +3635,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Pin mode", fanPinMode field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 7a8bf9ce6e..c2a252a250 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 22:18:32 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:19 UTC 2020 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 66201bc0a5..63b4671b52 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 18:35:39 UTC 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:22 UTC 2020 pageSize = 20000 page = 1 @@ -1195,6 +1195,7 @@ page = 1 injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." + isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." @@ -1408,7 +1409,6 @@ page = 1 ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" - ; recordDef = headerLen, footerLen, recordLen recordDef = 0, 0, 5 @@ -3245,6 +3245,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "MIL / Check Engine Pin", malfunctionIndicatorPin field = "test557pin", test557pin field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin field = "Main Relay Pin", mainRelayPin field = "Starter Relay Pin", starterRelayDisablePin @@ -3629,6 +3630,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Pin mode", fanPinMode field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index e6ccc3fa76..3cce182d90 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sat Jun 27 18:35:40 UTC 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:23 UTC 2020 pageSize = 20000 page = 1 @@ -1195,6 +1195,7 @@ page = 1 injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." + isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." @@ -1408,7 +1409,6 @@ page = 1 ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" - ; recordDef = headerLen, footerLen, recordLen recordDef = 0, 0, 5 @@ -3239,6 +3239,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "MIL / Check Engine Pin", malfunctionIndicatorPin field = "test557pin", test557pin field = "Fan Pin", fanPin + field = "A/C Relay", acRelayPin field = "Main Relay Pin", mainRelayPin field = "Starter Relay Pin", starterRelayDisablePin @@ -3608,6 +3609,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Pin mode", fanPinMode field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature +; this one has build-in FSIO logic + field = "A/C Relay", acRelayPin + field = "A/C Relay Mode", acRelayPinMode dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin diff --git a/java_console/models/src/com/rusefi/config/generated/EngineState.java b/java_console/models/src/com/rusefi/config/generated/EngineState.java index 42542091a5..0961f69fbb 100644 --- a/java_console/models/src/com/rusefi/config/generated/EngineState.java +++ b/java_console/models/src/com/rusefi/config/generated/EngineState.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/engine_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index be669447d1..35352a8967 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Jun 22 02:17:44 UTC 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Sun Jun 28 14:03:17 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/models/src/com/rusefi/config/generated/PidState.java b/java_console/models/src/com/rusefi/config/generated/PidState.java index f14a809c78..f2d413de82 100644 --- a/java_console/models/src/com/rusefi/config/generated/PidState.java +++ b/java_console/models/src/com/rusefi/config/generated/PidState.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/pid_state.txt Sun Sep 22 08:31:57 EDT 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/pid_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/models/src/com/rusefi/config/generated/TriggerCentral.java b/java_console/models/src/com/rusefi/config/generated/TriggerCentral.java index 634967bce5..ff45839ca9 100644 --- a/java_console/models/src/com/rusefi/config/generated/TriggerCentral.java +++ b/java_console/models/src/com/rusefi/config/generated/TriggerCentral.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Sun Sep 22 08:31:58 EDT 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_central.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/models/src/com/rusefi/config/generated/TriggerState.java b/java_console/models/src/com/rusefi/config/generated/TriggerState.java index ce2fc9c1df..9f9911838c 100644 --- a/java_console/models/src/com/rusefi/config/generated/TriggerState.java +++ b/java_console/models/src/com/rusefi/config/generated/TriggerState.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Sun Sep 22 08:31:58 EDT 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/trigger_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/models/src/com/rusefi/config/generated/WallFuelState.java b/java_console/models/src/com/rusefi/config/generated/WallFuelState.java index 233345c20d..a0b0c384d8 100644 --- a/java_console/models/src/com/rusefi/config/generated/WallFuelState.java +++ b/java_console/models/src/com/rusefi/config/generated/WallFuelState.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel_state.txt Sun Sep 22 08:31:58 EDT 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on (unknown script) integration/wall_fuel_state.txt Sun Jun 28 14:03:25 UTC 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; diff --git a/java_console/rusefi.xml b/java_console/rusefi.xml index 91bd2598f8..470341f7d1 100644 --- a/java_console/rusefi.xml +++ b/java_console/rusefi.xml @@ -1,6 +1,6 @@ - +