! This file defines the format of rusEFI persistent configuration structure ! This file is processed by ../java_tools/config_definition.jar tool ! Comments start with '!' ! ! The format is unique to rusEFI but there is a guide to the format available in java_tools/config_definition/RusefiConfigGrammar.g4 ! ! This file is used in combination with tunerstudio/rusefi.input to generate the .ini files used by turner TunerStudio. ! The easiest way to find a specific variable within this config is to search within rusefi.input for the on screen text from tuner studio ! this should provide the actual variable name, for example searching for "Number of Cylinders" will provide the variable "cylindersCount". ! Then you can search for "cylindersCount" in this file to find the definition. ! ! This file consists of two parts: ! The first part is engine_configuration_s area, followed by a few tuning tables. ! ! The only difference here is that engine_configuration_s area does not support hot modification while tuning tables can ! be modified without burning changes. ! ! See also tunerstudio/readme.md ! ! # Adding new fields ! The most important thing to note when adding fields is that if you change the offset ! of any other fields, users will have their configs scrambled when they update their firmware. ! As a result, this file is an organism that must be handled carefully. You may notice that ! there isn't much organization to this file with fields in amongst unrelated fields. ! That's OK, it's just a result of things being removed and new things being put in their ! places, and new things only being able to be added at the end of the structure or where ! other things were removed previously. ! Find a "padding" field (usually the huge mainUnusedEnd[] array at the end of the structure) ! The standard practice is to name these "unusedSomething", so you can find them easily ! by searching for "unused" within this file. ! Rename or substitute the field with any new fields that total to the same size. ! If you're adding a field to the end of the file, add it just before mainUnusedEnd[], ! and subtract the size of the field you added from mainUnusedEnd[]. ! For example, if you added a uint8_t field, and mainUnusedEnd was `uint8_t[100]`, ! it should now be `uint8_t[99]` ! At this point it's a good idea to save your changes in version control, i.e. with `git commit`, ! so that you can roll back to the current state after you generate the config files. ! This is important because we do not include the generated files in pull requests. ! We have a Github Actions workflow that generates all the files automatically after ! the pull request has been merged. ! Invoke gen_config.sh to generate .h and .ini files. ! Now check the `git diff` to make sure you haven't accidentally changed the offsets of ! any other fields. ! If you did, reset your version control state to your commit, i.e. with `git stash`, ! and fix the fields you created to make sure that they total the same size. ! ! ! each field is declared as ! type name;comment ! ! ! ! Q: what's the difference between 'engineConfiguration' and rest of the 'persistent_config_s'? ! A: 'engineConfiguration' portion has 'activeConfiguration' copy so that we can detect changes ! todo: move all curves and tables out of engineConfiguration that would make 'activeConfiguration' smaller and we might save a couple of K of ram ! ! ! ! Q: What is "@OFFSET@"? ! A: That's a template placeholder for field offset within the resulting data structure. ! ! Q: What is "[0:2]"? ! A: That part of the bit declaration specified usage of three bits - from bit 0 to bit 2 ! ! Q: how does 'custom' work? ! A: let's look at ! #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 ! ! here #define XXX_enum defines enum options in a reusable way ! @@XXX_e_enum@@ is using the enum options defined above ! ! "custom NEW_TYPE_NAME 1 bits, U08, @OFFSET@, [0:1], @@can_baudrate_e_enum@@" defines NEW_TYPE_NAME ! and "can_baudrate_e canBaudRate; set can_baudrate" creates a parameter of that custom type "can_baudrate_e" ! ! ! bit bitName,"true value","false value";+Tooltip text ! ! ! ! units,scale,offset,min,max,digits ! ! 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 20210310 ! 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 10010 #define LOG_DELIMITER "`" ! all the sub-structures are going to be nested within the primary structure, that's ! needed to get a proper TunerStudio file struct_no_prefix persistent_config_s struct_no_prefix engine_configuration_s #define LE_COMMAND_LENGTH 200 ! see 'blockingFactor' in rusefi.ini #define BLOCKING_FACTOR 256 ! Back in the day we wanted enums to be 32 bit integers. ! as of 2020 preference is with ' __attribute__ ((__packed__))' allowing one-byte enums ! todo: Technical debt: ENUM_32_BITS #3874 #define ENUM_16_BITS 60000 #define ENUM_32_BITS 2000000000 #define AUX_ANALOG_INPUT_COUNT 8 #define LUA_PWM_COUNT 8 #define LUA_ANALOG_INPUT_COUNT 8 ! V engines or flat engines would have pairs of shafts with same trigger shape and target position #define BANKS_COUNT 2 #define CAMS_PER_BANK 2 #define CAMS_PER_BANK_padding 0 #define GEARS_COUNT 8 #define CAM_INPUTS_COUNT @@BANKS_COUNT@@*@@CAMS_PER_BANK@@ #define CAM_INPUTS_COUNT_padding 0 ! https://github.com/rusefi/rusefi/issues/2010 shows the corner case wheel with huge depth requirement #define GAP_TRACKING_LENGTH 18 #define SERVO_COUNT 8 #define CONSOLE_DATA_PROTOCOL_TAG " @" #define MAIN_HELP_URL "http://www.rusefi.com/" #define ETB_BIAS_CURVE_LENGTH 8 #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 COMPOSITE_DATA_LENGTH_HALF 1250 #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 TORQUE_CURVE_SIZE 6 #define CLT_CURVE_SIZE 16 #define CLT_LIMITER_CURVE_SIZE 4 #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 16 #define CLT_TIMING_CURVE_SIZE 8 #define IDLE_VE_SIZE 4 #define TCU_SOLENOID_COUNT 6 #define TCU_GEAR_COUNT 10 ! Matt says: The problem is the driver chip. Tle9201 can't do 20k. The drivers are too slow. On purpose to reduce EMI #define ETB_HW_MAX_FREQUENCY 3000 #define ETB_COUNT 2 #define DC_PER_STEPPER 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_RPM_COUNT 16 #define MAX_CYLINDER_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 SCRIPT_SETTING_COUNT 8 #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 FUEL_LEVEL_TABLE_COUNT 8 #define STFT_CELL_COUNT 4 #define STFT_BANK_COUNT 2 #define CAN_DEFAULT_BASE 0x200 #define TRIGGERS_FILE_NAME "triggers.txt" #define TRIGGER_IS_CRANK_KEY "crankBased" #define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam" #define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel" #define TRIGGER_HARDCODED_OPERATION_MODE "knownOperationMode" #define TRIGGER_COMMENT "#" ! ! 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 ! ! ! one byte RPM with '50' multiplier limits us at 12750 RPM which is below what small engines do ! in order for rusEFI to run on some F1 engines shall we move away from one byte RPM or bump multiplier to 100 or what? #define RPM_1_BYTE_PACKING_MULT 50 #define VOLTAGE_1_BYTE_PACKING_DIV 0.02 #define PERCENT_TRIM_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_HIGH_PRESSURE 10 #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_LAMBDA 10000 #define PACK_MULT_ANGLE 50 #define PACK_MULT_VOLTAGE 1000 #define PACK_MULT_MASS_FLOW 10 #define TPS_2_BYTE_PACKING_MULT 100 #define PACK_MULT_AFR_CFG 10 #define PACK_MULT_LAMBDA_CFG 147 #define PACK_MULT_FUEL_MASS 100 #define PACK_PERCENT_BYTE_MULT 100.0 #define PACK_MULT_FUEL_FLOW 200 #define SCRIPT_TABLE_8 8 #define SCRIPT_CURVE_8 8 #define SCRIPT_CURVE_16 16 #define TPS_TPS_ACCEL_TABLE 8 #define ADC_CHANNEL_NONE 0 #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 #define GPPWM_LOAD_COUNT 8 #define GPPWM_RPM_COUNT 8 #define GPPWM_CHANNELS 4 #define GPPWM_NOTE_SIZE 16 struct stft_cell_cfg_s int8_t maxAdd;;"%", 1, 0, 0, 25, 0 int8_t maxRemove;;"%", 1, 0, -25, 0, 0 uint16_t autoscale timeConstant;+Time constant for correction while in this cell: this sets responsiveness of the closed loop correction. A value of 5.0 means it will try to make most of the correction within 5 seconds, and a value of 1.0 will try to correct within 1 second.;"sec", 0.1, 0, 0.1, 100, 2 end_struct struct stft_s uint8_t autoscale maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0 uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active;"load", 1, 0, 0, 250, 0 uint8_t minPowerLoad;+Above this engine load, the power region is active;"load", 1, 0, 0, 250, 0 uint8_t autoscale 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 autoscale minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 uint8_t autoscale 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 offset;Linear addition to PID logic;"", 1, 0, -1000, 1000, 0 int16_t periodMs;PID dTime;"ms", 1, 0, 0, 3000, 0 int16_t minValue;Output Min Duty Cycle;"", 1, 0, -30000, 30000, 0 int16_t maxValue;Output Max Duty Cycle;"", 1, 0, -30000, 30000, 0 end_struct #define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID" custom ego_sensor_e 1 bits, S08, @OFFSET@, [0:2], @@ego_sensor_e_enum@@ struct cranking_parameters_s float baseFuel;+Base mass of the per-cylinder fuel injected during cranking. This is then modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width.\nA reasonable starting point is 60mg per liter per cylinder.\nex: 2 liter 4 cyl = 500cc/cyl, so 30mg cranking fuel.;"mg", 1, 0, 0, 500, 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 "INVALID", "TPS acceleration enrichment", "GPPWM", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "VVT1 PID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "CJ125", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "rusEFI Wideband", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53" custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@ #define VM_VVT_INACTIVE 0 #define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2GZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K 4+1", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "vvt15", "vvt16", "vvt17" custom vvt_mode_e 1 bits, U08, @OFFSET@, [0:4], @@vvt_mode_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 2 bits, U16, @OFFSET@, [0:7], @@brain_input_pin_e_enum@@ ! ! 'Gpio' 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 a slow digital input suitable for clutch or brake pedal switch but not suitable for VSS or Flex sensor input ! #define Gpio_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", "PI0", "PI1", "PI2", "PI3", "PI4", "PI5", "PI6", "PI7", "PI8", "PI9", "PI10", "PI11", "PI12", "PI13", "PI14", "PI15", "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", "PI0", "PI1", "PI2", "PI3", "PI4", "PI5", "PI6", "PI7", "PI8", "PI9", "PI10", "PI11", "PI12", "PI13", "PI14", "PI15", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" custom Gpio 2 bits, U16, @OFFSET@, [0:7], @@Gpio_enum@@ custom switch_input_pin_e 2 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", "PI0", "PI1", "PI2", "PI3", "PI4", "PI5", "PI6", "PI7", "PI8", "PI9", "PI10", "PI11", "PI12", "PI13", "PI14", "PI15", "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", "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", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" custom output_pin_e 2 bits, U16, @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@@ #define pin_input_mode_e_enum "DEFAULT", "PULLUP", "PULLDOWN" custom pin_input_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_input_mode_e_enum@@ struct spi_pins Gpio mosiPin; Gpio misoPin; Gpio sckPin; end_struct #define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Zero", "Accel Pedal", "Battery Voltage" custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:3], @@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;+Hysteresis: in on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 uint8_t offBelowDuty;+Hysteresis: 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 alignmentFill_map;;"unit", 1, 0, 0, 100, 0 uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0, 250, 0 uint8_t[GPPWM_RPM_COUNT] autoscale rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0 uint8_t[GPPWM_RPM_COUNT x GPPWM_LOAD_COUNT] table;;"duty", 1, 0, 0, 100, 0 end_struct custom air_pressure_sensor_type_e 1 bits, U08, @OFFSET@, [0:4], "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "GM 3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "GM 2 Bar", "GM 1 Bar", "MPXH6400" ! ! lower 16 values are used on stm32 rusEFI, values above 16 are related to Kinetis work in progress ! #define adc_channel_e_enum "Disabled", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5" custom adc_channel_e 1 bits, U08, @OFFSET@, [0:5], @@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; end_struct struct MAP_sensor_config_s @brief MAP averaging configuration float[MAP_ANGLE_SIZE] samplingAngleBins;;"", 1, 0, 0, 18000, 2 float[MAP_ANGLE_SIZE] samplingAngle;MAP averaging sampling start crank degree angle;"deg", 1, 0, -720, 720, 2 float[MAP_WINDOW_SIZE] samplingWindowBins;;"", 1, 0, 0, 18000, 2 float[MAP_WINDOW_SIZE] samplingWindow;MAP averaging angle crank degree duration;"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 linear_sensor_s @brief Linear sensor interpolation adc_channel_e hwChannel; float v1;;"volts", 1, 0, 0, 10, 2 float value1;;"kPa", 1, 0, 0, 1000000, 2 float v2;;"volts", 1, 0, 0, 10, 2 float value2;;"kPa", 1, 0, 0, 1000000, 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:6], @@engine_type_e_auto_enum@@ engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X uint8_t autoscale sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 30000, 0 uint8_t autoscale rpmHardLimit;set rpm_hard_limit X;"rpm", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 20000, 2 uint8_t autoscale launchRpm;A secondary Rev limit engaged by the driver to help launch the vehicle faster;"rpm", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 20000, 2 uint8_t autoscale engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 30000, 0 uint8_t autoscale multisparkMaxRpm;+Disable multispark above this engine speed.;"rpm", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 3000, 0 uint8_t autoscale maxAcRpm;+Above this RPM, disable AC. Set to 0 to disable check.;"rpm", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 10000, 0 uint8_t maxAcTps;+Above this TPS, disable AC. Set to 0 to disable check.;"%", 1, 0, 0, 100, 0 uint8_t maxAcClt;+Above this CLT, disable AC to prevent overheating the engine. Set to 0 to disable check.;"deg C", 1, 0, 0, 150, 0 uint8_t[ENGINE_NOISE_CURVE_SIZE] autoscale knockNoiseRpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 18000, 2 uint8_t multisparkMaxSparkingAngle;+This parameter sets the latest that the last multispark can occur after the main ignition event. For example, if the ignition timing is 30 degrees BTDC, and this parameter is set to 45, no multispark will ever be fired after 15 degrees ATDC.;"deg", 1, 0, 0, 60, 0 uint8_t multisparkMaxExtraSparkCount;+Configures the maximum number of extra sparks to fire (does not include main spark);"count", 1, 0, 1, 5, 0 uint8_t[DWELL_CURVE_SIZE] autoscale sparkDwellRpmBins;On Single Coil or Wasted Spark setups you have to lower dwell at high RPM;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 18000, 2 float[DWELL_CURVE_SIZE] sparkDwellValues;;"ms", 1, 0, 0, 30, 2 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, 20, 2 float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0, 50, 2 end_struct injector_s injector bit isForcedInduction;Does the vehicle have a turbo or supercharger? bit useFordRedundantTps;+On Ford vehicles one of the sensors is not linear on the full range, i.e. in the specific range of the positions we effectively have only one sensor. bit isVerboseAuxPid1 bit overrideTriggerGaps bit enableFan1WithAc;+Turn on this fan when AC is on. bit enableFan2WithAc;+Turn on this fan when AC is on. bit disableFan1WhenStopped;+Inhibit operation of this fan while the engine is not running. bit disableFan2WhenStopped;+Inhibit operation of this fan while the engine is not running. bit enableTrailingSparks;+Enable secondary spark outputs that fire after the primary (rotaries, twin plug engines). 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/BMW 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 useEeprom 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 useCicPidForIdle;+Switch between Industrial and Cic PID implementation bit useTLE8888_cranking_hack; bit useInstantRpmForIdle; bit useSeparateIdleTablesForCrankingTaper;+This uses separate ignition timing and VE tables not only for idle conditions, also during the postcranking-to-idle taper transition (See also afterCrankingIACtaperDuration). bit launchControlEnabled; bit rollingLaunchEnabled; bit antiLagEnabled; bit useRunningMathForCranking,"Fuel Map","Fixed";+For cranking either use the specified fixed base fuel mass, or use the normal running math (VE table). bit displayLogicLevelsInEngineSniffer;+Shall we display real life signal or just the part consumed by trigger decoder.\nApplies to both trigger and cam/vvt input.\n\nenable logic_level_trigger bit useTLE8888_stepper bit enableMapEstimationTableFallback;+If enabled, the MAP estimate table will be used if the MAP sensor fails to estimate manifold pressure based on RPM and TPS. bit usescriptTableForCanSniffingFiltering bit verboseCan,"Print all","Do not print";Print incoming and outgoing first bus CAN messages in rusEFI console bit artificialTestMisfire,"Danger Mode","No thank you";Experimental setting that will cause a misfire\nDO NOT ENABLE. bit issue_294_31,"si_example","nada_example" !todo: extract these two fields into a structure int16_t tpsMin;+Closed throttle, 1 volt = 200 units.\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 int16_t tpsMax;+Full throttle.\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 ignitionDwellForCrankingMs;+Dwell duration while cranking;"ms", 1, 0, 0, 200, 1 uint16_t etbRevLimitStart;+Once engine speed passes this value, start reducing ETB angle.;"rpm", 1, 0, 0, 15000, 0 uint16_t etbRevLimitRange;+This far above 'Soft limiter start', fully close the throttle. At the bottom of the range, throttle control is normal. At the top of the range, the throttle is fully closed.;"rpm", 1, 0, 0, 2000, 0 MAP_sensor_config_s map;@see isMapAveragingEnabled ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! ThermistorConf iat; 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, 32, 0 float knockBandCustom;+We calculate knock band based of cylinderBore\n Use this to override - kHz knock band override;"kHz", 1, 0, 0, 20, 2 struct_no_prefix specs_s float displacement;Engine volume/capacity, in litres\nsee also cylindersCount;"L", 1, 0, 0, 1000, 2 uint32_t cylindersCount;Number of cylinder the engine has.;"", 1, 0, 1, @@MAX_CYLINDER_COUNT@@, 0 ! 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:5], "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", "1-2-3-4-5-6-7-8", "1-5-4-8-6-3-7-2", "1-4-3-6-2-5", "1-8-7-3-6-5-4-2", "1-6-2-4-3-5", "1-6-5-4-3-2", "1-4-5-2-3-6", "fo32", "fo33", "fo34", "fo35", "fo36", "fo37" firing_order_e firingOrder; end_struct specs_s specs float cylinderBore;Cylinder diameter in mm.;"mm", 1, 0, 0, 20000, 2 #define engine_load_mode_e_enum "INVALID", "INVALID", "INVALID", "Speed Density", "MAF Air Charge", "Alpha-N", "Lua" custom engine_load_mode_e 1 bits, U08, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nAlpha-N means drive by TPS commonly only used for NA engines\nSpeed Density requires MAP sensor and is the default choice for may installs\nMAF air charge is a cylinder filling based method that uses a mass air flow sensor.; uint8_t[3] alignmentFill_at_1 custom injection_mode_e 1 bits, U08, @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". uint8_t[3] alignmentFill_at_2 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, -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.\nThere is tapering towards running timing advance\nset cranking_timing_angle X;"deg", 1, 0, -30, 30, 0 custom ignition_mode_e 1 bits, U08, @OFFSET@, [0:1], "Single Coil", "Individual Coils", "Wasted Spark", "Two Distributors" ignition_mode_e ignitionMode;+Single coil = distributor\nIndividual coils = one coil per cylinder (COP, coil-near-plug), requires sequential mode\nWasted spark = Fires pairs of cylinders together, either one coil per pair of cylinders or one coil per cylinder\nTwo distributors = A pair of distributors, found on some BMW, Toyota and other engines\nset ignition_mode X int8_t gapTrackingLengthOverride;How many consecutive gap rations have to match expected ranges for sync to happen;"count", 1, 0, 0, @@GAP_TRACKING_LENGTH@@, 0 uint8_t maxIdleVss;+Above this speed, disable closed loop idle control. Set to 0 to disable (allow closed loop idle at any speed).;"kph", 1, 0, 0, 100, 0 uint16_t minOilPressureAfterStart;+Expected oil pressure after starting the engine. If oil pressure does not reach this level within 5 seconds of engine start, fuel will be cut. Set to 0 to disable and always allow starting.;"kPa", 1, 0, 0, 1000, 0 custom timing_mode_e 1 bits, U08, @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 with a timing light). 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 angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nPositive value in case of synchnization point before TDC and negative in case of synchnization point after TDC\n.Knowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg btdc", 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, 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, 2 float fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 float fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 float driveWheelRevPerKm;Number of revolutions per kilometer for the wheels your vehicle speed sensor is connected to. Use an online calculator to determine this based on your tire size.;"revs/km", 1, 0, 100, 1000, 1 custom can_nbc_e 1 bits, U08, @OFFSET@, [0:4], "None", "FIAT", "VAG", "MAZDA RX8", "BMW", "W202", "BMW E90", "Haltech", "VAG MQB", "Nissan VQ35", "Genesis Coupe", "Honda K", "AiM", "type 13", "type 14", "INVALID" can_nbc_e canNbcType;set can_mode X int canSleepPeriodMs;CANbus thread period in ms;"ms", 1, 0, 0, 1000, 2 custom display_mode_e 1 bits, U08, @OFFSET@, [0:1], "none", "hd44780", "hd44780 over pcf8574", "INVALID" display_mode_e displayMode; 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 float idle_derivativeFilterLoss;+0.1 is a good default value;"x", 1, 0, -1000000, 1000000, 4 int trailingSparkAngle;+just a temporary solution;"angle", 1, 0, 0, 720, 0 struct trigger_config_s @brief Trigger wheel(s) configuration #define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Mercedes Two Segment", "Mitsubishi 4G93", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "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 NB", "INVALID", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "TriTach", "GM 60/2/2/2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "Mitsubishi 3A92", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32/2", "36-2-1", "36-2-1-1", "trg72" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:6], @@trigger_type_e_enum@@ trigger_type_e type;+https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers\nset 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, 500, 0 int customSkippedToothCount;;"number", 1, 0, 0, 500, 0 end_struct trigger_config_s trigger; custom spi_device_e 1 bits, U08, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4" spi_device_e hip9011SpiDevice; uint8_t failedMapFallback;Single value to be used in event of a failed MAP sensor \nThis value is only used for speed density fueling calculations.;"kPa", 1, 0, 0, 100, 0 uint8_t boostControlSafeDutyCycle;+Duty cycle to use in case of a sensor failure. This duty cycle should produce the minimum possible amount of boost.;"%", 1, 0, 0, 100, 0 adc_channel_e mafAdcChannel float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0, 0, 1000, 2 float adcVcc;;"volts", 1, 0, 0, 6, 3 float mapCamDetectionAnglePosition;;"Deg", 1, 0, 0, 360, 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. uint8_t[CAM_INPUTS_COUNT_padding] camInputsPadding;; struct afr_sensor_s adc_channel_e hwChannel; float v1;;"volts", 1, 0, 0, 10, 2 float value1;;"AFR", 1, 0, 0, 1000, 2 float v2;;"volts", 1, 0, 0, 10, 2 float value2;;"AFR", 1, 0, 0, 1000, 2 end_struct afr_sensor_s afr adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position first channel\nSee throttlePedalPositionSecondAdcChannel for second channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X\nSee throttlePedalUpVoltage and throttlePedalWOTVoltage Gpio 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 Gpio stepperDirectionPin Gpio stepperStepPin pin_output_mode_e solenoidPinMode end_struct struct dc_io Gpio directionPin1; Gpio directionPin2; Gpio controlPin;Acts as EN pin in two-wire mode Gpio disablePin; end_struct idle_hardware_s idle; float manIdlePosition;+Value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0 uint8_t autoscale knockRetardAggression;+Ignition timing to remove when a knock event occurs.;"%", 0.1, 0, 0, 20, 1 uint8_t autoscale knockRetardReapplyRate;+After a knock event, reapply timing at this rate.;"deg/s", 0.1, 0, 0, 10, 1 uint8_t knockRetardMaximum;+Maximum amount of knock retard.;"deg", 1, 0, 0, 30, 0 uint8_t vssFilterReciprocal;Set this so your vehicle speed signal is responsive, but not noisy. Larger value give smoother but slower response.;"", 1, 0, 2, 200, 0 uint16_t autoscale vssGearRatio;Number of turns of your vehicle speed sensor per turn of the wheels. For example if your sensor is on the transmission output, enter your axle/differential ratio. If you are using a hub-mounted sensor, enter a value of 1.0.; "ratio", 0.001, 0, 0, 60, 3 uint8_t vssToothCount;Number of pulses output per revolution of the shaft where your VSS is mounted. For example, GM applications of the T56 output 17 pulses per revolution of the transmission output shaft.;"count", 1, 0, 1, 100, 0 Gpio l9779_cs; ! 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\nTODO: rename to triggerSimulatorRpm;"Rpm", 1, 0, 0, 30000, 0 output_pin_e[MAX_CYLINDER_COUNT iterate] injectionPins; output_pin_e[MAX_CYLINDER_COUNT iterate] ignitionPins; pin_output_mode_e injectionPinMode; pin_output_mode_e ignitionPinMode; Gpio HD44780_rs; Gpio HD44780_e; Gpio HD44780_db4; Gpio HD44780_db5; Gpio HD44780_db6; Gpio HD44780_db7; Gpio gps_rx_pin; Gpio 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; Gpio[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; pin_output_mode_e electronicThrottlePin1Mode; Gpio wboHeaterPin;set_cj125_heater_pin XXX Gpio cj125CsPin;set_cj125_cs_pin XXX spi_device_e max31855spiDevice; Gpio debugTriggerSync; spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code Gpio mc33972_cs; pin_output_mode_e mc33972_csPinMode; custom adc_channel_mode_e 1 bits, U08, @OFFSET@, [0:1], "Off", "Slow", "Fast" 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\nSee throttlePedalSecondaryUpVoltage and throttlePedalSecondaryWOTVoltage uint8_t[FUEL_LEVEL_TABLE_COUNT] fuelLevelValues;;"%", 1, 0, 0, 100, 0 ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it; float idle_antiwindupFreq;+0.1 is a good default value;"x", 1, 0, -1000000, 1000000, 4 brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins; pin_output_mode_e hip9011CsPinMode; output_pin_e tachOutputPin; pin_output_mode_e tachOutputPinMode; output_pin_e mainRelayPin; Gpio sdCardCsPin; Gpio canTxPin;set_can_tx_pin X Gpio canRxPin;set_can_rx_pin X pin_input_mode_e throttlePedalUpPinMode; uint8_t acIdleExtraOffset;+Additional idle % while A/C is active;"%", 1, 0, 0, 100, 0 uint16_t autoscale finalGearRatio;Ratio between the wheels and your transmission output. ;"ratio", 0.01, 0, 0, 10, 2 brain_input_pin_e tcuInputSpeedSensorPin uint8_t tcuInputSpeedSensorTeeth uint16_t wastegatePositionMin;+Voltage when the wastegate is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0 uint16_t wastegatePositionMax;+Voltage when the wastegate is fully open.\nYou probably don't have one of these!\n1 volt = 1000 units;"mv", 1, 0, 0, 5000, 0 uint16_t idlePositionMin;+Voltage when the idle valve is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0 uint16_t idlePositionMax;+Voltage when the idle valve is open.\nYou probably don't have one of these!\n1 volt = 1000 units;"mv", 1, 0, 0, 5000, 0 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, 1 Gpio[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. 'ON' if engine is running, 'OFF' if stopped or cranking. See wboHeaterPin pin_output_mode_e o2heaterPinModeTodO; bit is_enabled_spi_1 bit is_enabled_spi_2 bit is_enabled_spi_3 bit isSdCardEnabled;enable sd/disable sd bit rusefiVerbose29b,"29 bit","11 bit";+Use 11 bit (standard) or 29 bit (extended) IDs for rusEFI verbose CAN format. 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,"Rising","Falling";+Use rise or fall signal front\nget vvtCamSensorUseRise bit measureMapOnlyInOneCylinder;+Useful for individual intakes bit stepperForceParkingEveryRestart bit isFasterEngineSpinUpEnabled;+If enabled, try to fire the engine before a full engine cycle has been completed using RPM estimated from the last 90 degrees of engine rotation. As soon as the trigger syncs plus 90 degrees rotation, fuel and ignition events will occur. If disabled, worst case may require up to 4 full crank rotations before any events are scheduled. 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. Used in Auto-PID Idle mode. bit useNoiselessTriggerDecoder bit useIdleTimingPidControl bit disableEtbWhenEngineStopped;+Allows disabling the ETB when the engine is stopped. You may not like the power draw or PWM noise from the motor, so this lets you turn it off until it's necessary. bit is_enabled_spi_4 bit pauseEtbControl;+Disable the electronic throttle motor and DC idle motor for testing.\nThis mode is for testing ETB/DC idle 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;+AEM X-Series or rusEFI Wideband ! '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; Gpio hip9011CsPin; Gpio 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, 40, 70, 0 uint8_t minimumBoostClosedLoopMap;+Minimum MAP before closed loop boost is enabled. Use to prevent misbehavior upon entering boost.;"kPa", 1, 0, 0, 255, 0 output_pin_e acFanPin;+Optional Radiator Fan used with A/C pin_output_mode_e acFanPinMode; spi_device_e l9779spiDevice; uint8_t[DWELL_CURVE_SIZE] autoscale dwellVoltageCorrVoltBins;;"volts", 0.1, 0, 0, 20, 1 custom imu_type_e 1 bits, U08, @OFFSET@, [0:4], "None", "VAG", "MM5.10", "type 2", "type 2" imu_type_e imuType uint8_t[DWELL_CURVE_SIZE] autoscale dwellVoltageCorrValues;;"multiplier", 0.02, 0, 0, 5, 2 uint16_t vehicleWeight;;"kg", 1, 0, 0, 10000, 0 int16_t idlePidRpmUpperLimit;+How far above idle speed do we consider idling?\nFor example, if target = 800, this param = 200, then anything below 1000 RPM is considered idle.;"RPM", 1, 0, 0, 500, 0 uint16_t autoscale applyNonlinearBelowPulse;+Apply nonlinearity correction below a pulse of this duration. Pulses longer than this duration will receive no adjustment.;"ms", {1/1000}, 0, 0, 30, 3 Gpio lps25BaroSensorScl Gpio lps25BaroSensorSda 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 custom InjectorNonlinearMode 1 bits, U08, @OFFSET@, [0:0], "None", "Polynomial" InjectorNonlinearMode injectorNonlinearMode pin_input_mode_e clutchUpPinMode; Gpio[EGT_CHANNEL_COUNT iterate] max31855_cs; brain_input_pin_e flexSensorPin;+Continental/GM flex fuel sensor, 50-150hz type; Gpio test557pin pin_output_mode_e stepperDirectionPinMode; spi_device_e mc33972spiDevice; uint8_t autoscale stoichRatioSecondary;+Stoichiometric ratio for your secondary fuel. This value is used when the Flex Fuel sensor indicates E100, typically 9.0;":1", {1/@@PACK_MULT_AFR_CFG@@}, 0, 5, 25, 1 uint8_t etbMaximumPosition;Maximum allowed ETB position. Some throttles go past fully open, so this allows you to limit it to fully open.;"%", 1, 0, 70, 100, 0 custom uart_device_e 1 bits, U08, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3" int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 adc_channel_e idlePositionSensor; Gpio debugMapAveraging; output_pin_e starterRelayDisablePin; pin_output_mode_e starterRelayDisablePinMode;On some vehicles we can disable starter once engine is already running output_pin_e secondSolenoidPin;Some Subaru and some Mazda use double-solenoid idle air valve switch_input_pin_e startStopButtonPin;See also starterControlPin int mapMinBufferLength;+This many MAP samples are used to estimate the current MAP. This many samples are considered, and the minimum taken. Recommended value is 1 for single-throttle engines, and your number of cylinders for individual throttle bodies.;"count", 1, 0, 1, 24, 0 int16_t idlePidDeactivationTpsThreshold;+Below this throttle position, the engine is considered idling. If you have an electronic throttle, this checks accelerator pedal position instead of throttle position, and should be set to 1-2%.;"%", 1, 0, 0, 50, 0 int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000, 0 uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 int16_t antiLagRpmTreshold;;"rpm", 1, 0, 0, 20000, 0 uint16_t startCrankingDuration;+Maximum time to crank starter when start/stop button is pressed;"Seconds", 1, 0, 0, 30, 0 Gpio 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 script_setting_t 4 scalar, F32, @OFFSET@, "", 1, 0, 0, 18000, 2 script_setting_t[SCRIPT_SETTING_COUNT iterate] scriptSetting; ! todo: migrate to spi_pins & combine with spi pin modes Gpio spi1mosiPin; Gpio spi1misoPin; Gpio spi1sckPin; Gpio spi2mosiPin; Gpio spi2misoPin; Gpio spi2sckPin; Gpio spi3mosiPin; Gpio spi3misoPin; Gpio spi3sckPin; Gpio cdmInputPin;+Saab Combustion Detection Module knock signal input pin\nalso known as Saab Ion Sensing Module; Gpio joystickCenterPin; Gpio joystickAPin; Gpio joystickBPin; Gpio joystickCPin; Gpio joystickDPin; uart_device_e consoleUartDevice; #define sensor_chart_e_enum "none", "trigger", "INVALID", "RPM ACCEL", "DETAILED RPM", "Fast Aux1" custom sensor_chart_e 1 bits, S08, @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 1 bits, S08, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@ maf_sensor_type_e mafSensorType; #define CAN_RX_PREFIX "CAN_rx" #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 gppwm_note_t @@GPPWM_NOTE_SIZE@@ string, ASCII, @OFFSET@, @@GPPWM_NOTE_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@@ bit clutchUpPinInverted bit clutchDownPinInverted bit useHbridgesToDriveIdleStepper;+If enabled we use two H-bridges to drive stepper idle air valve bit multisparkEnable bit enableLaunchRetard bit unfinishedenableLaunchBoost bit unfinishedlaunchDisableBySpeed bit enableCanVss;+Read VSS from OEM CAN bus according to selected CAN vehicle configuration. 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 tempBooleanForVerySpecialCases bit enableSoftwareKnock bit verboseVVTDecoding;enable vvt_details bit invertCamVVTSignal;get invertCamVVTSignal bit consumeObdSensors;+This property is useful if using rusEFI as TCM or BCM only\nenable consumeObdSensors bit knockBankCyl1,"Channel 2","Channel 1" bit knockBankCyl2,"Channel 2","Channel 1" bit knockBankCyl3,"Channel 2","Channel 1" bit knockBankCyl4,"Channel 2","Channel 1" bit knockBankCyl5,"Channel 2","Channel 1" bit knockBankCyl6,"Channel 2","Channel 1" bit knockBankCyl7,"Channel 2","Channel 1" bit knockBankCyl8,"Channel 2","Channel 1" bit knockBankCyl9,"Channel 2","Channel 1" bit knockBankCyl10,"Channel 2","Channel 1" bit knockBankCyl11,"Channel 2","Channel 1" bit knockBankCyl12,"Channel 2","Channel 1" bit tcuEnabled bit canBroadcastUseChannelTwo,"second","first" bit useRawOutputToDriveIdleStepper;+If enabled we use four Push-Pull outputs to directly drive stepper idle air valve coilss bit verboseCan2,"Print all","Do not print";Print incoming and outgoing second bus CAN messages in rusEFI console dc_io[ETB_COUNT iterate] etbIo output_pin_e boostControlPin;+Wastegate control Solenoid; 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 #define launchActivationMode_e_enum "Launch Button", "Clutch Down Switch", "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 1 bits, S08, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@ antiLagActivationMode_e antiLagActivationMode; int launchSpeedThreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300, 0 int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000, 0 int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100, 0 int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100, 0 int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000, 2 int launchAdvanceRpmRange;;"rpm", 1, 0, 0, 20000, 0 int launchTpsTreshold;;"rpm", 1, 0, 0, 20000, 0 float launchActivateDelay;;"rpm", 1, 0, 0, 20000, 0 stft_s stft dc_io[DC_PER_STEPPER iterate] stepperDcIo 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; custom etb_function_e 1 bits, U08, @OFFSET@, [0:2], "None", "Throttle 1", "Throttle 2", "Idle Valve", "Wastegate" etb_function_e[ETB_COUNT iterate] etbFunctions spi_device_e drv8860spiDevice; Gpio drv8860_cs; pin_output_mode_e drv8860_csPinMode; Gpio drv8860_miso; uint16_t[FUEL_LEVEL_TABLE_COUNT] autoscale fuelLevelBins;;"volt", {1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3 output_pin_e[LUA_PWM_COUNT iterate] luaOutputPins float[CAM_INPUTS_COUNT iterate] vvtOffsets;+Angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1 float[CAM_INPUTS_COUNT_padding] vvtOffsetsPadding;; struct vr_threshold_s uint8_t[6] autoscale rpmBins;;"rpm", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0 uint8_t[6] autoscale values;;"volts", {1/@@PACK_PERCENT_BYTE_MULT@@}, 0, 0, 2.5, 2 Gpio pin; end_struct ! todo: should be '3' since we are dreaming of Honda triple-channel distributor #define VR_THRESHOLD_COUNT 2 vr_threshold_s[VR_THRESHOLD_COUNT iterate] vrThreshold; gppwm_note_t[GPPWM_CHANNELS iterate] gpPwmNote; uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 bit disablePrimaryUart bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. bit isVerboseIAC;+Print details into rusEFI console\nenable verbose_idle bit boardUseTachPullUp,"12v","5v" bit boardUseTempPullUp,"With Pull Ups","Piggyback 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 boardUse2stepPullDown,"With Pull Down","With Pull Up" bit tachPulseDurationAsDutyCycle,"Duty cycle","Constant time";+Treat milliseconds value as duty cycle value, i.e. 0.5ms would become 50% 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,"yes","no" bit cutSparkOnHardLimit,"yes","no" bit launchFuelCutEnable bit launchSparkCutEnable;+This is the Cut Mode normally used bit boardUseCrankPullUp,"Hall","VR" bit boardUseCamPullDown,"With Pull Down","With Pull Up" bit boardUseCamVrPullUp,"Hall","VR" bit boardUseD2PullDown,"With Pull Down","With Pull Up" bit boardUseD3PullDown,"With Pull Down","With Pull Up" bit boardUseD4PullDown,"With Pull Down","With Pull Up" bit boardUseD5PullDown,"With Pull Down","With Pull Up" 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 launchActivateInverted bit twoStroke,"Two Stroke","Four Stroke" bit skippedWheelOnCam,"On camshaft","On crankshaft";+Where is your primary skipped wheel located? adc_channel_e hipOutputChannel; switch_input_pin_e acSwitch;A/C button input; adc_channel_e vRefAdcChannel; uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0 ! todo: convert this into a bit setting no need for 4 bytes and we do not expect a third option any day soon custom idle_mode_e 1 bits, U08, @OFFSET@, [0:0], "Open Loop + Closed Loop", "Open Loop" 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 complexWallModel,"Advanced (tables)","Basic (constants)";Should we use tables to vary tau/beta based on CLT/MAP, or just with fixed values? bit alwaysInstantRpm bit isMapAveragingEnabled bit overrideCrankingIacSetting;+If enabled, use separate temperature multiplier table for cranking idle position.\nIf disabled, use normal running multiplier table applied to the cranking base position. 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 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,"Table","Fixed (auto taper)";+In Constant mode, timing is automatically tapered to running as RPM increases.\nIn Table mode, the "Cranking ignition advance" table is used directly. bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle).\nYou probably don't need this. bit flexCranking;Enable a second cranking table to use for E100 flex fuel, interpolating between the two based on flex fuel sensor. 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 unused1476b20 bit unused1476b8 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 float turboSpeedSensorMultiplier;;"mult", 1, 0, 0, 7000, 3 Gpio[CAM_INPUTS_COUNT iterate] camInputsDebug; uint8_t[CAM_INPUTS_COUNT_padding] camInputsDebugPadding;; int16_t acIdleRpmBump;+Extra idle target speed when A/C is enabled. Some cars need the extra speed to keep the AC efficient while idling.;"RPM", 1, 0, 0, 1000, 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 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, 200, 2 float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0, 18000, 2 float[BARO_CORR_SIZE x BARO_CORR_SIZE] baroCorrTable;;"ratio", 1, 0, 0, 2, 2 #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, 700, 2 float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0, 100, 2 ! todo: rename field remove 'ms', also fix typo in name should be 'tachPulseDuration' and that would be an incompatible breaking change for users :( float tachPulseDuractionMs;+Duration in ms or duty cycle depending on selected mode;"", 1, 0, 0, 100, 2 float wwaeTau;+Length of time the deposited wall fuel takes to dissipate after the start of acceleration. ;"Seconds", 1, 0, 0, 3, 2 pid_s alternatorControl; pid_s etb; Gpio[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputDebugPins; brain_input_pin_e turboSpeedSensorInputPin; 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; Gpio mc33816_flag0; uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1, 255, 0 ! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100, 100, 2 float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100, 800, 2 uint16_t autoscale multisparkSparkDuration;+How long to wait for the spark to fire before recharging the coil for another spark.;"ms", 0.001, 0, 0, 3, 2 uint16_t autoscale multisparkDwell;+This sets the dwell time for subsequent sparks. The main spark's dwell is set by the dwell table.;"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, 1, 2 Gpio 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. Gpio runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. Gpio binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN Gpio binarySerialRxPin; Gpio[AUX_DIGITAL_VALVE_COUNT iterate] auxValves switch_input_pin_e tcuUpshiftButtonPin switch_input_pin_e tcuDownshiftButtonPin float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 int16_t startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0 int16_t idlePidRpmDeadZone;+If the RPM closer to target than this value, disable closed loop idle correction to prevent oscillation;"RPM", 1, 0, 0, 200, 0 float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100, 250, 2 uint8_t[CLT_CURVE_SIZE] autoscale cltIdleRpm;See idleRpmPid;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 8000, 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 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 Gpio auxSerialTxPin;Auxiliary sensor serial, not to be confused with secondary calibration serial\nset_aux_tx_pin X; Gpio warningLedPin; Gpio auxSerialRxPin;Auxiliary sensor serial, not to be confused with secondary calibration serial\nset_aux_rx_pin X; Gpio LIS302DLCsPin; uint8_t autoscale tpsAccelLookback;+How long to look back for TPS-based acceleration enrichment. Increasing this time will trigger enrichment for longer when a throttle position change occurs.;"sec", 0.05, 0, 0, 5, 2 uint8_t coastingFuelCutVssLow;+Below this speed, disable DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0 uint8_t coastingFuelCutVssHigh;+Above this speed, allow DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0 uint8_t autoscale noFuelTrimAfterDfcoTime;Pause closed loop fueling after deceleration fuel cut occurs. Set this to a little longer than however long is required for normal fueling behavior to resume after fuel cut.;"sec", 0.1, 0, 0, 10, 1 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, 1 brain_input_pin_e[2 iterate] auxSpeedSensorInputPin; uint8_t totalGearsCount;;"", 1, 0, 1, @@GEARS_COUNT@@, 0 custom InjectionTimingMode 1 bits, U08, @OFFSET@, [0:1], "End of injection", "Start of injection", "Center of injection" InjectionTimingMode injectionTimingMode;Sets what part of injection's is controlled by the injection phase table. uint32_t uartConsoleSerialSpeed;Band rate for primary TTL;"BPs", 1, 0, 0, 1000000, 0 float tpsDecelEnleanmentThreshold;For decel we simply multiply delta of TPS and tFor decel we do not use table?!;"roc", 1, 0, 0, 200, 1 float tpsDecelEnleanmentMultiplier;Magic multiplier, we multiply delta of TPS and get fuel squirt duration;"coeff", 1, 0, 0, 200, 2 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 #define ve_override_e_enum "None", "MAP", "TPS" custom ve_override_e 1 bits, U08, @OFFSET@, [0:1], @@ve_override_e_enum@@ ve_override_e veOverrideMode;+Override the Y axis (load) value used for the VE table.\nAdvanced users only: If you aren't sure you need this, you probably don't need this. can_baudrate_e can2BaudRate; #define load_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %" custom load_override_e 1 bits, U08, @OFFSET@, [0:2], @@load_override_e_enum@@ load_override_e afrOverrideMode;+Override the Y axis (load) value used for the AFR table.\nAdvanced users only: If you aren't sure you need this, you probably don't need this. uint8_t autoscale mc33_hpfp_i_peak;;"A", 0.1, 0, 0, 25, 1 uint8_t autoscale mc33_hpfp_i_hold;;"A", 0.1, 0, 0, 25, 1 uint8_t mc33_hpfp_i_hold_off;+How long to deactivate power when hold current is reached before applying power again;"us", 1, 0, 0, 255, 0 uint8_t mc33_hpfp_max_hold;+Maximum amount of time the solenoid can be active before assuming a programming error;"ms", 1, 0, 0, 255, 0 bit stepperDcInvertedPins;+Enable if DC-motor driver (H-bridge) inverts the signals (eg. RZ7899 on Hellen boards) bit unused1740b0 bit unused1740b1 bit unused1740b2 bit unused1127 bit unused1128 bit unused1129 bit unused1130 uint8_t autoscale benchTestOffTime;;"ms", 5, 0, 0, 2000, 1 uint8_t benchTestCount;;"count", 1, 0, 0, 250, 1 uint8_t autoscale benchTestOnTime;;"ms", 5, 0, 0, 2000, 1 pin_input_mode_e launchActivatePinMode; Gpio can2TxPin;set_can2_tx_pin X Gpio can2RxPin;set_can2_rx_pin X pin_output_mode_e starterControlPinMode; adc_channel_e wastegatePositionSensor; load_override_e ignOverrideMode;+Override the Y axis (load) value used for the ignition table.\nAdvanced users only: If you aren't sure you need this, you probably don't need this. custom injector_pressure_type_e 1 bits, U08, @OFFSET@, [0:0], "Low", "High" injector_pressure_type_e injectorPressureType;+Select which fuel pressure sensor measures the pressure of the fuel at your injectors. output_pin_e hpfpValvePin; pin_output_mode_e hpfpValvePinMode; float boostCutPressure;+MAP value above which fuel is cut in case of overboost.\nSet to 0 to disable overboost cut.;"kPa (absolute)", 1, 0, 0, 500, 0 uint8_t[16] autoscale tchargeBins;;"kg/h", 5, 0, 0, 1200, 0 uint8_t[16] autoscale tchargeValues;;"ratio", 0.01, 0, 0, 1, 2 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, 10, 2 float mapHighValueVoltage;MAP voltage for low point;"v", 1, 0, 0, 10, 2 float egoValueShift;EGO value correction;"value", 1, 0, -10, 10, 2 output_pin_e[CAM_INPUTS_COUNT iterate] vvtPins; spi_device_e cj125SpiDevice; pin_output_mode_e cj125CsPinMode; pin_output_mode_e sdCardCsPinMode; 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, 100, 0 float tChargeMinRpmMinTps;;"", 1, 0, 0, 3, 4 float tChargeMinRpmMaxTps;;"", 1, 0, 0, 3, 4 float tChargeMaxRpmMinTps;;"", 1, 0, 0, 3, 4 float tChargeMaxRpmMaxTps;;"", 1, 0, 0, 3, 4 custom pwm_freq_t 2 scalar, U16, @OFFSET@, "Hz", 1, 0, 0, 3000, 0 pwm_freq_t[CAMS_PER_BANK iterate] vvtOutputFrequency; uint8_t fan1ExtraIdle;+Additional idle % when fan #1 is active;"%", 1, 0, 0, 100, 0 int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000, 0 float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10, 10, 3 float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40, 40, 2 vvt_mode_e[CAMS_PER_BANK iterate] vvtMode;set vvt_mode X uint8_t[CAMS_PER_BANK_padding] vvtModePadding;; uint8_t fan2ExtraIdle;+Additional idle % when fan #2 is active;"%", 1, 0, 0, 100, 0 uint8_t autoscale primingDelay;+Delay to allow fuel pressure to build before firing the priming pulse.;"sec", 0.01, 0, 0, 1, 2 adc_channel_e[AUX_ANALOG_INPUT_COUNT iterate] auxAnalogInputs; output_pin_e[MAX_CYLINDER_COUNT iterate] trailingCoilPins; float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100, 250, 1 float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400, 400, 0 custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:1], "Auto", "SemiAuto", "Manual", "Hall" tle8888_mode_e tle8888mode; pin_output_mode_e LIS302DLCsPinMode; custom injector_compensation_mode_e 1 bits, U08, @OFFSET@, [0:1], "None", "Fixed rail pressure", "Sensed Rail Pressure" injector_compensation_mode_e injectorCompensationMode;+None = I have a MAP-referenced fuel pressure regulator\nFixed rail pressure = I have an atmosphere-referenced fuel pressure regulator (returnless, typically)\nSensed rail pressure = I have a fuel pressure sensor; pin_output_mode_e fan2PinMode; float fuelReferencePressure;+This is the pressure at which your injector flow is known.\nFor example if your injectors flow 400cc/min at 3.5 bar, enter 350kpa here.;"kPa", 1, 0, 0, 700000, 0 float postCrankingFactor;+Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 1, 3, 2 float postCrankingDurationSec;+Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 30, 0 ThermistorConf auxTempSensor1 ThermistorConf auxTempSensor2 int16_t knockSamplingDuration;;"Deg", 1, 0, 0, 720, 0 int16_t etbFreq;;"Hz", 1, 0, 0, @@ETB_HW_MAX_FREQUENCY@@, 0 pid_s etbWastegatePid; #define stepper_num_micro_steps_e_enum "Full-Step (Default)", "INVALID", "Half-Step", "INVALID", "1/4 Micro-Step", "INVALID", "INVALID", "INVALID", "1/8 Micro-Step" custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_micro_steps_e_enum@@ stepper_num_micro_steps_e stepperNumMicroSteps;+For micro-stepping, make sure that PWM frequency (etbFreq) is high enough; uint8_t stepperMinDutyCycle;+Use to limit the current when the stepper motor is idle, not moving (100% = no limit);"%", 1, 0, 0, 100, 0 uint8_t stepperMaxDutyCycle;+Use to limit the max.current through the stepper motor (100% = no limit);"%", 1, 0, 0, 100, 0 spi_device_e sdCardSpiDevice; angle_t[MAX_CYLINDER_COUNT iterate] timing_offset_cylinder;per-cylinder timing correction;"deg", 1, 0, -720, 720, 1 float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1 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; Gpio mc33816_rstb;ResetB Gpio 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[CAMS_PER_BANK iterate] auxPid; float[8 iterate] injectorCorrectionPolynomial;;"", 1, 0, -1000, 1000, 4 int8_t[8] primeBins;;"C", 1, 0, -40, 120, 0 linear_sensor_s oilPressure; spi_device_e accelerometerSpiDevice; output_pin_e fan2Pin; uint8_t fan2OnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 uint8_t fan2OffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 #define SCRIPT_CURVE_COUNT 6 #define SCRIPT_TABLE_COUNT 4 float[SCRIPT_CURVE_16] scriptCurve1Bins;;"x", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_16] scriptCurve1;;"y", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_16] scriptCurve2Bins;;"x", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_16] scriptCurve2;;"y", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_8] scriptCurve3Bins;;"x", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_8] scriptCurve3;;"y", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_8] scriptCurve4Bins;;"x", 1, 0, -999, 1000, 3 float[SCRIPT_CURVE_8] scriptCurve4;;"y", 1, 0, -999, 1000, 3 Gpio stepperEnablePin; Gpio tle8888_cs; pin_output_mode_e tle8888_csPinMode; Gpio mc33816_cs; float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0, 18000, 2 float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;+Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2 Gpio[SERVO_COUNT iterate] servoOutputPins;todo: more comments int16_t coastingFuelCutRpmHigh;+This sets the RPM above which fuel cut is active.;"rpm", 1, 0, 0, 5000, 0 int16_t coastingFuelCutRpmLow;+This sets the RPM below which fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0 int16_t coastingFuelCutTps;+Throttle position below which fuel cut is active. With an electronic throttle enabled, this checks against pedal position.;"%", 1, 0, 0, 20, 0 int16_t coastingFuelCutClt;+Fuel cutoff is disabled when the engine is cold.;"C", 1, 0, -100, 100, 0 int16_t pidExtraForLowRpm;+Increases PID reaction for RPM