rusefi-1/firmware/controllers/algo/engine_configuration_genera...

2792 lines
50 KiB
C
Raw Normal View History

2019-05-27 17:06:01 -07:00
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 20:05:22 EDT 2019
2017-03-27 19:19:58 -07:00
// begin
2019-05-27 17:06:01 -07:00
#ifndef CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
#define CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
2015-07-10 06:01:56 -07:00
#include "rusefi_types.h"
2018-12-19 18:32:26 -08:00
// start of pid_s
struct pid_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
float pFactor;
/**
* offset 4
*/
float iFactor;
/**
* offset 8
*/
float dFactor;
/**
* Linear addition to PID logic
* offset 12
*/
int16_t offset;
/**
* PID dTime
* offset 14
*/
2019-02-10 19:47:49 -08:00
int16_t periodMs;
/**
2018-11-22 20:15:05 -08:00
* Output min value
* offset 16
*/
int16_t minValue;
/**
2018-11-22 20:15:05 -08:00
* Output max value
* offset 18
*/
int16_t maxValue;
/** total size 20*/
};
typedef struct pid_s pid_s;
2018-12-19 18:32:26 -08:00
// start of cranking_parameters_s
struct cranking_parameters_s {
2017-03-27 19:19:58 -07:00
/**
* Fuel squirt duration while cranking
* A number of curves adjust this value according to CLT/IAT/TPS etc
* offset 0
*/
float baseFuel;
/**
* Cranking mode threshold. Special cranking logic controls fuel and spark while RPM is below this threshold
* set cranking_rpm X
* offset 4
*/
int16_t rpm;
/**
* need 4 byte alignment
* offset 6
*/
2015-07-10 06:01:56 -07:00
uint8_t alignmentFill[2];
/** total size 8*/
};
typedef struct cranking_parameters_s cranking_parameters_s;
2019-04-04 18:34:33 -07:00
// start of spi_pins
struct spi_pins {
2019-04-04 18:34:33 -07:00
/**
* offset 0
*/
brain_pin_e mosiPin;
/**
* offset 1
*/
brain_pin_e misoPin;
/**
* offset 2
*/
brain_pin_e sckPin;
/**
* need 4 byte alignment
* offset 3
*/
uint8_t alignmentFill;
/** total size 4*/
};
typedef struct spi_pins spi_pins;
2019-04-04 18:34:33 -07:00
2018-12-19 18:32:26 -08:00
// start of air_pressure_sensor_config_s
struct air_pressure_sensor_config_s {
2017-03-27 19:19:58 -07:00
/**
* kPa value at low volts
* offset 0
*/
float lowValue;
/**
* kPa value at high volts
* offset 4
*/
float highValue;
/**
* offset 8
*/
air_pressure_sensor_type_e type;
/**
* offset 12
*/
adc_channel_e hwChannel;
/**
* offset 13
*/
uint8_t align[3];
/** total size 16*/
};
typedef struct air_pressure_sensor_config_s air_pressure_sensor_config_s;
/**
2017-03-27 19:19:58 -07:00
* @brief MAP averaging configuration
*/
2018-12-19 18:32:26 -08:00
// start of MAP_sensor_config_s
struct MAP_sensor_config_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
2015-07-10 06:01:56 -07:00
float samplingAngleBins[MAP_ANGLE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* @brief MAP averaging sampling start angle, by RPM
* offset 32
*/
2015-07-10 06:01:56 -07:00
float samplingAngle[MAP_ANGLE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 64
*/
2015-07-10 06:01:56 -07:00
float samplingWindowBins[MAP_WINDOW_SIZE];
2017-03-27 19:19:58 -07:00
/**
* @brief MAP averaging angle duration, by RPM
* offset 96
*/
2015-07-10 06:01:56 -07:00
float samplingWindow[MAP_WINDOW_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 128
*/
air_pressure_sensor_config_s sensor;
/** total size 144*/
};
typedef struct MAP_sensor_config_s MAP_sensor_config_s;
/**
2017-03-27 19:19:58 -07:00
* @brief Thermistor known values
*/
2018-12-19 18:32:26 -08:00
// start of thermistor_conf_s
struct thermistor_conf_s {
2017-03-27 19:19:58 -07:00
/**
* these values are in Celcuus
* offset 0
*/
float tempC_1;
/**
* offset 4
*/
float tempC_2;
/**
* offset 8
*/
float tempC_3;
/**
* offset 12
*/
float resistance_1;
/**
* offset 16
*/
float resistance_2;
/**
* offset 20
*/
float resistance_3;
/**
* offset 24
*/
float bias_resistor;
/** total size 28*/
};
typedef struct thermistor_conf_s thermistor_conf_s;
/**
* @brief Oil pressure sensor interpolation
*/
2018-12-19 18:32:26 -08:00
// start of oil_pressure_config_s
struct oil_pressure_config_s {
/**
* offset 0
*/
adc_channel_e hwChannel;
/**
* offset 1
*/
uint8_t align[3];
/**
* offset 4
*/
float v1;
/**
* offset 8
*/
float value1;
/**
* offset 12
*/
float v2;
/**
* offset 16
*/
float value2;
/** total size 20*/
};
typedef struct oil_pressure_config_s oil_pressure_config_s;
/**
2017-03-27 19:19:58 -07:00
* @brief Thermistor curve parameters
*/
2018-12-19 18:32:26 -08:00
// start of ThermistorConf
struct ThermistorConf {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
thermistor_conf_s config;
/**
* offset 28
*/
adc_channel_e adcChannel;
/**
* need 4 byte alignment
* offset 29
*/
uint8_t alignmentFill[3];
/** total size 32*/
};
typedef struct ThermistorConf ThermistorConf;
2018-12-19 18:32:26 -08:00
// start of injector_s
struct injector_s {
2017-03-27 19:19:58 -07:00
/**
* cc/min, cubic centimeter per minute
* By the way, g/s = 0.125997881 * (lb/hr)
* g/s = 0.125997881 * (cc/min)/10.5
* g/s = 0.0119997981 * cc/min
* offset 0
*/
float flow;
/**
* set_flat_injector_lag LAG
* set_injector_lag VOLTAGE LAG
* offset 4
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
float battLagCorrBins[VBAT_INJECTOR_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* ms delay between injector open and close dead times
* offset 36
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
float battLagCorr[VBAT_INJECTOR_CURVE_SIZE];
/** total size 68*/
};
typedef struct injector_s injector_s;
2018-12-19 18:32:26 -08:00
// start of bi_quard_s
struct bi_quard_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
float a0;
/**
* offset 4
*/
float a1;
/**
* offset 8
*/
float a2;
/**
* offset 12
*/
float b1;
/**
* offset 16
*/
float b2;
/** total size 20*/
};
typedef struct bi_quard_s bi_quard_s;
2018-12-19 18:32:26 -08:00
// start of specs_s
struct specs_s {
2017-03-27 19:19:58 -07:00
/**
* Engine displacement, in liters
* see also cylindersCount
* offset 0
*/
float displacement;
/**
* offset 4
*/
cylinders_count_t cylindersCount;
/**
* offset 8
*/
firing_order_e firingOrder;
/** total size 12*/
};
typedef struct specs_s specs_s;
/**
2017-03-27 19:19:58 -07:00
* @brief Trigger wheel(s) configuration
*/
2018-12-19 18:32:26 -08:00
// start of trigger_config_s
struct trigger_config_s {
2017-03-27 19:19:58 -07:00
/**
* set trigger_type X
* offset 0
*/
trigger_type_e type;
/**
offset 4 bit 0 */
bool unusedCustomIsSynchronizationNeeded : 1;
/**
offset 4 bit 1 */
bool unusedCustomNeedSecondTriggerInput : 1;
/**
* This option could be used if your second trigger channel is broken
offset 4 bit 2 */
bool useOnlyFirstChannel : 1;
/**
* offset 8
*/
int customTotalToothCount;
/**
* offset 12
*/
int customSkippedToothCount;
/** total size 16*/
};
typedef struct trigger_config_s trigger_config_s;
2018-12-19 18:32:26 -08:00
// start of afr_sensor_s
struct afr_sensor_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
adc_channel_e hwChannel;
/**
* offset 1
*/
uint8_t alignAf[3];
2017-03-27 19:19:58 -07:00
/**
* offset 4
*/
float v1;
/**
* offset 8
*/
float value1;
/**
* offset 12
*/
float v2;
/**
* offset 16
*/
float value2;
/** total size 20*/
};
typedef struct afr_sensor_s afr_sensor_s;
2018-12-19 18:32:26 -08:00
// start of idle_hardware_s
struct idle_hardware_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
int solenoidFrequency;
2017-03-27 19:19:58 -07:00
/**
* offset 4
*/
brain_pin_e solenoidPin;
2017-03-27 19:19:58 -07:00
/**
* offset 5
2017-03-27 19:19:58 -07:00
*/
brain_pin_e stepperDirectionPin;
/**
* offset 6
2017-03-27 19:19:58 -07:00
*/
brain_pin_e stepperStepPin;
/**
* offset 7
*/
pin_output_mode_e solenoidPinMode;
/** total size 8*/
};
typedef struct idle_hardware_s idle_hardware_s;
// start of etb_io
struct etb_io {
/**
* offset 0
*/
brain_pin_e directionPin1;
/**
* offset 1
*/
brain_pin_e directionPin2;
/**
* offset 2
*/
brain_pin_e controlPin1;
/**
2019-04-11 20:21:16 -07:00
* currently UNUSED
* offset 3
*/
brain_pin_e controlPin2;
/** total size 4*/
};
typedef struct etb_io etb_io;
2018-12-19 18:32:26 -08:00
// start of board_configuration_s
struct board_configuration_s {
2017-03-27 19:19:58 -07:00
/**
* offset 0
*/
idle_hardware_s idle;
/**
* value between 0 and 100 used in Manual mode
* offset 8
2017-03-27 19:19:58 -07:00
*/
float manIdlePosition;
/**
* offset 12
2017-03-27 19:19:58 -07:00
*/
float mapFrequency0Kpa;
2017-03-27 19:19:58 -07:00
/**
* offset 16
2017-03-27 19:19:58 -07:00
*/
float mapFrequency100Kpa;
2017-03-27 19:19:58 -07:00
/**
2019-05-06 06:16:03 -07:00
* See also triggerSimulatorPins
* See also directSelfStimulation
* rpm X
* offset 20
2017-03-27 19:19:58 -07:00
*/
int triggerSimulatorFrequency;
2017-03-27 19:19:58 -07:00
/**
* offset 24
2017-03-27 19:19:58 -07:00
*/
brain_pin_e injectionPins[INJECTION_PIN_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 36
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
brain_pin_e ignitionPins[IGNITION_PIN_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 48
*/
pin_output_mode_e injectionPinMode;
/**
* offset 49
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e ignitionPinMode;
/**
* offset 50
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_rs;
2017-03-27 19:19:58 -07:00
/**
* offset 51
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_e;
2017-03-27 19:19:58 -07:00
/**
* offset 52
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_db4;
2017-03-27 19:19:58 -07:00
/**
* offset 53
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_db5;
2017-03-27 19:19:58 -07:00
/**
* offset 54
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_db6;
2017-03-27 19:19:58 -07:00
/**
* offset 55
2017-03-27 19:19:58 -07:00
*/
brain_pin_e HD44780_db7;
2017-03-27 19:19:58 -07:00
/**
* offset 56
2017-03-27 19:19:58 -07:00
*/
brain_pin_e gps_rx_pin;
2017-03-27 19:19:58 -07:00
/**
* offset 57
2017-03-27 19:19:58 -07:00
*/
brain_pin_e gps_tx_pin;
2017-03-27 19:19:58 -07:00
/**
* offset 58
2017-03-27 19:19:58 -07:00
*/
2019-04-13 07:58:52 -07:00
smart_pin_e fuelPumpPin;
2017-03-27 19:19:58 -07:00
/**
* offset 59
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e fuelPumpPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 60
2017-03-27 19:19:58 -07:00
*/
2019-04-13 07:58:52 -07:00
smart_pin_e malfunctionIndicatorPin;
2017-03-27 19:19:58 -07:00
/**
* offset 61
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e malfunctionIndicatorPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 62
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e fanPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 63
2017-03-27 19:19:58 -07:00
*/
2019-04-13 07:58:52 -07:00
smart_pin_e fanPin;
2017-03-27 19:19:58 -07:00
/**
* some cars have a switch to indicate that clutch pedal is all the way down
* offset 64
2017-03-27 19:19:58 -07:00
*/
brain_pin_e clutchDownPin;
2017-03-27 19:19:58 -07:00
/**
* offset 65
2017-03-27 19:19:58 -07:00
*/
2019-05-02 08:21:35 -07:00
smart_pin_e alternatorControlPin;
2017-03-27 19:19:58 -07:00
/**
* offset 66
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e alternatorControlPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 67
2017-03-27 19:19:58 -07:00
*/
pin_input_mode_e clutchDownPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 68
2017-03-27 19:19:58 -07:00
*/
brain_pin_e digitalPotentiometerChipSelect[DIGIPOT_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 72
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e electronicThrottlePin1Mode;
2017-03-27 19:19:58 -07:00
/**
* offset 73
2017-03-27 19:19:58 -07:00
*/
brain_pin_e wboHeaterPin;
2017-03-27 19:19:58 -07:00
/**
* offset 74
2017-03-27 19:19:58 -07:00
*/
brain_pin_e cj125CsPin;
2017-03-27 19:19:58 -07:00
/**
* offset 75
2017-03-27 19:19:58 -07:00
*/
uint8_t unusedEtbM;
2017-03-27 19:19:58 -07:00
/**
* offset 76
2017-03-27 19:19:58 -07:00
*/
uint8_t unusedSpiPadding9;
2019-04-14 15:12:15 -07:00
/**
* Digital Potentiometer is used by stock ECU stimulation code
2019-04-14 15:12:15 -07:00
* offset 77
*/
spi_device_e digitalPotentiometerSpiDevice;
/**
* offset 78
*/
brain_pin_e mc33972_cs;
/**
* offset 79
*/
pin_output_mode_e mc33972_csPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 80
2017-03-27 19:19:58 -07:00
*/
etb_io etb1;
2017-03-27 19:19:58 -07:00
/**
* offset 84
2017-03-27 19:19:58 -07:00
*/
float fuelLevelEmptyTankVoltage;
/**
* offset 88
2017-03-27 19:19:58 -07:00
*/
float fuelLevelFullTankVoltage;
/**
* AFR, WBO, EGO - whatever you like to call it
* offset 92
2017-03-27 19:19:58 -07:00
*/
ego_sensor_e afr_type;
/**
* offset 96
2017-03-27 19:19:58 -07:00
*/
float fuelClosedLoopAfrLowThreshold;
2017-03-27 19:19:58 -07:00
/**
* offset 100
*/
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT];
/**
* offset 103
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e hip9011CsPinMode;
/**
* This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin.
* offset 104
2017-03-27 19:19:58 -07:00
*/
brain_pin_e tachOutputPin;
/**
* offset 105
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e tachOutputPinMode;
/**
* offset 106
2017-03-27 19:19:58 -07:00
*/
2019-05-01 19:26:07 -07:00
smart_pin_e mainRelayPin;
2017-03-27 19:19:58 -07:00
/**
* offset 107
2017-03-27 19:19:58 -07:00
*/
brain_pin_e sdCardCsPin;
2017-03-27 19:19:58 -07:00
/**
* offset 108
2017-03-27 19:19:58 -07:00
*/
brain_pin_e canTxPin;
2017-03-27 19:19:58 -07:00
/**
* offset 109
2017-03-27 19:19:58 -07:00
*/
brain_pin_e canRxPin;
2017-03-27 19:19:58 -07:00
/**
* offset 110
2017-03-27 19:19:58 -07:00
*/
brain_pin_e boardTestModeJumperPin;
2017-03-27 19:19:58 -07:00
/**
* offset 111
2017-03-27 19:19:58 -07:00
*/
uint8_t unusedMa2;
2017-03-27 19:19:58 -07:00
/**
* offset 112
2017-03-27 19:19:58 -07:00
*/
int idleThreadPeriodMs;
2017-03-27 19:19:58 -07:00
/**
* offset 116
2017-03-27 19:19:58 -07:00
*/
int consoleLoopPeriodMs;
2017-03-27 19:19:58 -07:00
/**
* offset 120
2017-03-27 19:19:58 -07:00
*/
int lcdThreadPeriodMs;
2017-03-27 19:19:58 -07:00
/**
* offset 124
2017-03-27 19:19:58 -07:00
*/
int generalPeriodicThreadPeriodMs;
2017-03-27 19:19:58 -07:00
/**
* offset 128
2017-03-27 19:19:58 -07:00
*/
uint32_t tunerStudioSerialSpeed;
2017-03-27 19:19:58 -07:00
/**
* offset 132
2017-03-27 19:19:58 -07:00
*/
can_device_mode_e canDeviceMode;
2017-03-27 19:19:58 -07:00
/**
2019-05-06 06:16:03 -07:00
* See also directSelfStimulation
* offset 136
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
brain_pin_e triggerSimulatorPins[TRIGGER_SIMULATOR_PIN_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 139
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
pin_output_mode_e triggerSimulatorPinModes[TRIGGER_SIMULATOR_PIN_COUNT];
2017-03-27 19:19:58 -07:00
/**
2018-06-16 05:17:54 -07:00
* Narrow band o2 heater, not used for CJ125. See wboHeaterPin
* offset 142
2017-03-27 19:19:58 -07:00
*/
brain_pin_e o2heaterPin;
/**
* offset 143
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e o2heaterPinModeTodO;
/**
offset 144 bit 0 */
2017-03-27 19:19:58 -07:00
bool is_enabled_spi_1 : 1;
/**
offset 144 bit 1 */
2017-03-27 19:19:58 -07:00
bool is_enabled_spi_2 : 1;
/**
offset 144 bit 2 */
2017-03-27 19:19:58 -07:00
bool is_enabled_spi_3 : 1;
/**
offset 144 bit 3 */
2017-03-27 19:19:58 -07:00
bool isSdCardEnabled : 1;
/**
offset 144 bit 4 */
2017-03-27 19:19:58 -07:00
bool isFastAdcEnabled : 1;
/**
offset 144 bit 5 */
2017-03-27 19:19:58 -07:00
bool isEngineControlEnabled : 1;
/**
offset 144 bit 6 */
2017-03-27 19:19:58 -07:00
bool isHip9011Enabled : 1;
/**
offset 144 bit 7 */
2017-03-27 19:19:58 -07:00
bool isVerboseAlternator : 1;
/**
offset 144 bit 8 */
2017-03-27 19:19:58 -07:00
bool useSerialPort : 1;
/**
offset 144 bit 9 */
2017-03-27 19:19:58 -07:00
bool useStepperIdle : 1;
/**
offset 144 bit 10 */
2017-03-27 19:19:58 -07:00
bool enabledStep1Limiter : 1;
/**
offset 144 bit 11 */
2017-03-27 19:19:58 -07:00
bool useTpicAdvancedMode : 1;
/**
offset 144 bit 12 */
2017-03-27 19:19:58 -07:00
bool useLcdScreen : 1;
/**
offset 144 bit 13 */
bool unusedAnotherOne : 1;
2017-03-27 19:19:58 -07:00
/**
offset 144 bit 14 */
2017-03-27 19:19:58 -07:00
bool useWarmupPidAfr : 1;
/**
offset 144 bit 15 */
2017-03-27 19:19:58 -07:00
bool onOffAlternatorLogic : 1;
/**
offset 144 bit 16 */
2017-03-27 19:19:58 -07:00
bool isCJ125Enabled : 1;
/**
* Use rise or fall signal front
offset 144 bit 17 */
2017-03-27 19:19:58 -07:00
bool vvtCamSensorUseRise : 1;
2018-01-02 18:25:40 -08:00
/**
2018-01-24 06:03:42 -08:00
* Useful for individual intakes
offset 144 bit 18 */
2018-01-24 06:03:42 -08:00
bool measureMapOnlyInOneCylinder : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 19 */
bool stepperForceParkingEveryRestart : 1;
2018-01-02 18:25:40 -08:00
/**
* Smarter cranking logic.
* See also startOfCrankingPrimingPulse
offset 144 bit 20 */
2018-03-03 05:54:23 -08:00
bool isFasterEngineSpinUpEnabled : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 21 */
bool coastingFuelCutEnabled : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 22 */
bool useIacTableForCoasting : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 23 */
2018-04-25 23:15:03 -07:00
bool useNoiselessTriggerDecoder : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 24 */
2019-03-22 20:00:21 -07:00
bool useIdleTimingPidControl : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 25 */
2019-03-22 20:00:21 -07:00
bool useTPSBasedVeTable : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 26 */
2019-04-14 15:12:15 -07:00
bool is_enabled_spi_4 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 27 */
bool pauseEtbControl : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 28 */
bool alignEngineSnifferAtTDC : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 29 */
bool useETBforIdleControl : 1;
2018-01-02 18:25:40 -08:00
/**
offset 144 bit 30 */
bool idleIncrementalPidCic : 1;
/**
offset 144 bit 31 */
bool unused_board_984_31 : 1;
2017-03-27 19:19:58 -07:00
/**
* offset 148
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
brain_input_pin_e logicAnalyzerPins[LOGIC_ANALYZER_CHANNEL_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 152
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e mainRelayPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 153
2017-03-27 19:19:58 -07:00
*/
brain_pin_e hip9011CsPin;
2017-03-27 19:19:58 -07:00
/**
* offset 154
2017-03-27 19:19:58 -07:00
*/
brain_pin_e hip9011IntHoldPin;
2017-03-27 19:19:58 -07:00
/**
* offset 155
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e hip9011IntHoldPinMode;
2017-03-27 19:19:58 -07:00
/**
* default or inverted input
* offset 156
2017-03-27 19:19:58 -07:00
*/
uint8_t logicAnalyzerMode[LOGIC_ANALYZER_CHANNEL_COUNT];
/**
* offset 160
*/
int unrealisticRpmThreashold;
/**
* offset 164
*/
pin_output_mode_e gpioPinModes[FSIO_COMMAND_COUNT];
2017-03-27 19:19:58 -07:00
/**
2017-11-19 08:05:57 -08:00
* todo: more comments
* offset 180
2017-03-27 19:19:58 -07:00
*/
2019-05-01 19:26:07 -07:00
smart_pin_e fsioOutputPins[FSIO_COMMAND_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 196
2017-03-27 19:19:58 -07:00
*/
brain_pin_e max31855_cs[EGT_CHANNEL_COUNT];
/**
* offset 204
*/
spi_device_e max31855spiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 205
*/
uint8_t unusedSpiPadding2[3];
2017-03-27 19:19:58 -07:00
/**
* offset 208
2017-03-27 19:19:58 -07:00
*/
uart_device_e consoleUartDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 209
*/
uint8_t unuseduartPadding1[3];
2017-03-27 19:19:58 -07:00
/**
* offset 212
2017-03-27 19:19:58 -07:00
*/
2017-06-22 00:10:07 -07:00
int mapMinBufferLength;
2017-03-27 19:19:58 -07:00
/**
* offset 216
2017-03-27 19:19:58 -07:00
*/
2017-05-27 20:43:48 -07:00
int16_t idlePidDeactivationTpsThreshold;
/**
* offset 218
2017-05-27 20:43:48 -07:00
*/
int16_t stepperParkingExtraSteps;
2017-03-27 19:19:58 -07:00
/**
* offset 220
2017-03-27 19:19:58 -07:00
*/
float nb2ratioFrom;
/**
* offset 224
2017-03-27 19:19:58 -07:00
*/
float nb2ratioTo;
/**
* This pin is used for debugging - snap a logic analyzer on it and see if it's ever high
* offset 228
2017-03-27 19:19:58 -07:00
*/
brain_pin_e triggerErrorPin;
/**
* offset 229
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e triggerErrorPinMode;
/**
* offset 230
2017-03-27 19:19:58 -07:00
*/
2019-05-01 19:26:07 -07:00
smart_pin_e acRelayPin;
2017-03-27 19:19:58 -07:00
/**
* offset 231
2017-03-27 19:19:58 -07:00
*/
pin_output_mode_e acRelayPinMode;
/**
* offset 232
2017-03-27 19:19:58 -07:00
*/
2017-06-25 23:14:31 -07:00
fsio_pwm_freq_t fsioFrequency[FSIO_COMMAND_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 264
2017-03-27 19:19:58 -07:00
*/
2017-06-25 23:14:31 -07:00
fsio_setting_t fsio_setting[FSIO_COMMAND_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 328
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi1mosiPin;
/**
* offset 329
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi1misoPin;
/**
* offset 330
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi1sckPin;
/**
* offset 331
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi2mosiPin;
/**
* offset 332
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi2misoPin;
/**
* offset 333
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi2sckPin;
/**
* offset 334
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi3mosiPin;
/**
* offset 335
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi3misoPin;
/**
* offset 336
2017-03-27 19:19:58 -07:00
*/
brain_pin_e spi3sckPin;
/**
2019-01-04 19:09:38 -08:00
* Saab Combustion Detection Module knock signal input pin
2019-05-05 14:21:36 -07:00
* also known as Saab Ion Sensing Module
* offset 337
2017-03-27 19:19:58 -07:00
*/
2019-01-04 19:09:38 -08:00
brain_pin_e cdmInputPin;
2017-03-27 19:19:58 -07:00
/**
* offset 338
2017-03-27 19:19:58 -07:00
*/
brain_pin_e joystickCenterPin;
/**
* offset 339
2017-03-27 19:19:58 -07:00
*/
brain_pin_e joystickAPin;
/**
* offset 340
2017-03-27 19:19:58 -07:00
*/
brain_pin_e joystickBPin;
/**
* offset 341
2017-03-27 19:19:58 -07:00
*/
brain_pin_e joystickCPin;
/**
* offset 342
2017-03-27 19:19:58 -07:00
*/
brain_pin_e joystickDPin;
/**
* offset 343
*/
uint8_t unusedjoy;
2017-03-27 19:19:58 -07:00
/**
* rusEfi console Sensor Sniffer mode
* offset 344
2017-03-27 19:19:58 -07:00
*/
sensor_chart_e sensorChartMode;
/**
* offset 348
2017-03-27 19:19:58 -07:00
*/
maf_sensor_type_e mafSensorType;
/**
* todo:not finshed
* These input pins allow us to pull toggle buttons state
* offset 352
*/
brain_pin_e fsioDigitalInputs[FSIO_COMMAND_COUNT];
/**
* offset 368
2017-03-27 19:19:58 -07:00
*/
brain_input_pin_e vehicleSpeedSensorInputPin;
/**
* Some vehicles have a switch to indicate that clutch pedal is all the way up
* offset 369
2017-03-27 19:19:58 -07:00
*/
brain_pin_e clutchUpPin;
/**
* offset 370
2017-03-27 19:19:58 -07:00
*/
brain_input_pin_e frequencyReportingMapInputPin;
2017-03-27 19:19:58 -07:00
/**
* offset 371
2017-03-27 19:19:58 -07:00
*/
pin_input_mode_e clutchUpPinMode;
2017-03-27 19:19:58 -07:00
/**
* offset 372
2017-03-27 19:19:58 -07:00
*/
float etbIdleRange;
/**
* offset 376
*/
int unusedAtBoardConfigurationEnd[122];
2019-03-02 10:21:12 -08:00
/** total size 864*/
};
typedef struct board_configuration_s board_configuration_s;
2018-12-19 18:32:26 -08:00
// start of engine_configuration_s
struct engine_configuration_s {
2017-03-27 19:19:58 -07:00
/**
* http://rusefi.com/wiki/index.php?title=Manual:Engine_Type
* set engine_type X
* offset 0
*/
engine_type_e engineType;
/**
* Engine sniffer would be disabled above this rpm
* set engineSnifferRpmThreshold X
* offset 4
*/
int engineSnifferRpmThreshold;
/**
* offset 8
*/
injector_s injector;
/**
* Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?
2019-05-06 06:16:03 -07:00
* See also triggerSimulatorPins
2017-03-27 19:19:58 -07:00
* PS: Funny name, right? :)
offset 76 bit 0 */
2017-03-27 19:19:58 -07:00
bool directSelfStimulation : 1;
/**
offset 76 bit 1 */
2017-03-27 19:19:58 -07:00
bool activateAuxPid1 : 1;
/**
offset 76 bit 2 */
2017-03-27 19:19:58 -07:00
bool isVerboseAuxPid1 : 1;
/**
offset 76 bit 3 */
2017-03-27 19:19:58 -07:00
bool activateAuxPid2 : 1;
/**
offset 76 bit 4 */
2017-03-27 19:19:58 -07:00
bool isVerboseAuxPid2 : 1;
/**
offset 76 bit 5 */
2017-03-27 19:19:58 -07:00
bool activateAuxPid3 : 1;
/**
offset 76 bit 6 */
2017-03-27 19:19:58 -07:00
bool isVerboseAuxPid3 : 1;
/**
offset 76 bit 7 */
2017-03-27 19:19:58 -07:00
bool activateAuxPid4 : 1;
/**
offset 76 bit 8 */
2017-03-27 19:19:58 -07:00
bool isVerboseAuxPid4 : 1;
/**
offset 76 bit 9 */
2017-03-27 19:19:58 -07:00
bool useBiQuadAnalogFiltering : 1;
/**
offset 76 bit 10 */
2018-06-17 12:07:42 -07:00
bool cj125isUaDivided : 1;
2017-03-27 19:19:58 -07:00
/**
offset 76 bit 11 */
2018-08-04 07:24:10 -07:00
bool cj125isLsu49 : 1;
2017-03-27 19:19:58 -07:00
/**
offset 76 bit 12 */
2019-04-11 20:21:16 -07:00
bool etb1_use_two_wires : 1;
2017-03-27 19:19:58 -07:00
/**
offset 76 bit 13 */
2019-04-11 20:21:16 -07:00
bool etb2_use_two_wires : 1;
2017-03-27 19:19:58 -07:00
/**
offset 76 bit 14 */
bool showSdCardWarning : 1;
2017-03-27 19:19:58 -07:00
/**
offset 76 bit 15 */
2017-03-27 19:19:58 -07:00
bool issue_294_15 : 1;
/**
offset 76 bit 16 */
2017-03-27 19:19:58 -07:00
bool issue_294_16 : 1;
/**
offset 76 bit 17 */
2017-03-27 19:19:58 -07:00
bool issue_294_17 : 1;
/**
offset 76 bit 18 */
2017-03-27 19:19:58 -07:00
bool issue_294_18 : 1;
/**
offset 76 bit 19 */
2017-03-27 19:19:58 -07:00
bool issue_294_19 : 1;
/**
offset 76 bit 20 */
2017-03-27 19:19:58 -07:00
bool issue_294_21 : 1;
/**
offset 76 bit 21 */
2017-03-27 19:19:58 -07:00
bool issue_294_22 : 1;
/**
offset 76 bit 22 */
2017-03-27 19:19:58 -07:00
bool issue_294_23 : 1;
/**
offset 76 bit 23 */
2017-03-27 19:19:58 -07:00
bool issue_294_24 : 1;
/**
offset 76 bit 24 */
2017-03-27 19:19:58 -07:00
bool issue_294_25 : 1;
/**
offset 76 bit 25 */
2017-03-27 19:19:58 -07:00
bool issue_294_26 : 1;
/**
offset 76 bit 26 */
2017-03-27 19:19:58 -07:00
bool issue_294_27 : 1;
/**
offset 76 bit 27 */
2017-03-27 19:19:58 -07:00
bool issue_294_28 : 1;
/**
offset 76 bit 28 */
2017-03-27 19:19:58 -07:00
bool issue_294_29 : 1;
/**
offset 76 bit 29 */
bool issue_294_30 : 1;
/**
offset 76 bit 30 */
bool issue_294_31 : 1;
2017-03-27 19:19:58 -07:00
/**
* Closed throttle. todo: extract these two fields into a structure
* todo: we need two sets of TPS parameters - modern ETBs have two sensors
2019-05-05 09:02:42 -07:00
* See also tps1_1AdcChannel
2019-03-02 10:21:12 -08:00
* set tps_min X
* offset 80
2017-03-27 19:19:58 -07:00
*/
int16_t tpsMin;
/**
* Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!
2019-05-05 09:02:42 -07:00
* See also tps1_1AdcChannel
2019-03-02 10:21:12 -08:00
* set tps_max X
* offset 82
2017-03-27 19:19:58 -07:00
*/
int16_t tpsMax;
/**
* TPS error detection, what TPS % value is unrealistically low
* offset 84
2017-03-27 19:19:58 -07:00
*/
int16_t tpsErrorDetectionTooLow;
/**
2018-07-22 08:54:58 -07:00
* TPS error detection, what TPS % value is unrealistically high
* offset 86
2017-03-27 19:19:58 -07:00
*/
int16_t tpsErrorDetectionTooHigh;
/**
* offset 88
2017-03-27 19:19:58 -07:00
*/
cranking_parameters_s cranking;
/**
* offset 96
2017-03-27 19:19:58 -07:00
*/
float primingSquirtDurationMs;
/**
2019-02-05 20:49:19 -08:00
* Used if useConstantDwellDuringCranking is TRUE
* offset 100
2017-03-27 19:19:58 -07:00
*/
float ignitionDwellForCrankingMs;
/**
* While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft
* degrees, not in absolute time as in running mode.
* set cranking_charge_angle X
* offset 104
2017-03-27 19:19:58 -07:00
*/
float crankingChargeAngle;
/**
* @see hasMapSensor
* @see isMapAveragingEnabled
* offset 108
2017-03-27 19:19:58 -07:00
*/
MAP_sensor_config_s map;
/**
* todo: merge with channel settings, use full-scale Thermistor here!
* offset 252
2017-03-27 19:19:58 -07:00
*/
ThermistorConf clt;
/**
* offset 284
2017-03-27 19:19:58 -07:00
*/
ThermistorConf iat;
/**
* A secondary Rev limit engaged by the driver to help launch the vehicle faster
* offset 316
2017-03-27 19:19:58 -07:00
*/
int step1rpm;
/**
* offset 320
2017-03-27 19:19:58 -07:00
*/
int step1timing;
/**
* value '6' for 8MHz hw osc
* read hip9011 datasheet for details
* todo split into two bit fields
* offset 324
2017-03-27 19:19:58 -07:00
*/
int hip9011PrescalerAndSDO;
/**
2018-05-20 10:22:32 -07:00
* We calculate knock band based of cylinderBore
* Use this to override - kHz knock band override
* offset 328
2017-03-27 19:19:58 -07:00
*/
float knockBandCustom;
/**
2017-05-12 13:28:56 -07:00
* On single-coil or wasted spark setups you have to lower dwell at high RPM
* offset 332
2017-03-27 19:19:58 -07:00
*/
2017-02-18 12:01:47 -08:00
float sparkDwellRpmBins[DWELL_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 364
2017-03-27 19:19:58 -07:00
*/
2017-02-18 12:01:47 -08:00
float sparkDwellValues[DWELL_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 396
2017-03-27 19:19:58 -07:00
*/
specs_s specs;
/**
* Cylinder diameter, in mm.
* offset 408
2017-03-27 19:19:58 -07:00
*/
float cylinderBore;
/**
* Disable sensor sniffer above this rpm
* offset 412
2017-03-27 19:19:58 -07:00
*/
int sensorSnifferRpmThreshold;
/**
2017-04-29 18:17:20 -07:00
* set rpm_hard_limit X
* offset 416
2017-03-27 19:19:58 -07:00
*/
int rpmHardLimit;
/**
* This setting controls which fuel quantity control algorithm is used.
2019-04-12 15:24:43 -07:00
* See also useTPSAdvanceTable
2017-03-27 19:19:58 -07:00
* set algorithm X
* offset 420
2017-03-27 19:19:58 -07:00
*/
engine_load_mode_e fuelAlgorithm;
/**
* offset 424
2017-03-27 19:19:58 -07:00
*/
injection_mode_e crankingInjectionMode;
/**
* 'batched' means two injectors are wired together
* set injection_mode X
2018-01-17 16:18:48 -08:00
* See also twoWireBatchInjection
* offset 428
2017-03-27 19:19:58 -07:00
*/
injection_mode_e injectionMode;
/**
* this is about deciding when the injector starts it's squirt
* See also injectionPhase map
* todo: do we need even need this since we have the map anyway?
* offset 432
2017-03-27 19:19:58 -07:00
*/
angle_t extraInjectionOffset;
/**
* Timing advance while engine cranking
* set cranking_timing_angle X
* offset 436
2017-03-27 19:19:58 -07:00
*/
angle_t crankingTimingAngle;
/**
* 'wasted' means one coil is driving two spark plugs in two cylinders, with one of the aparks not doing anything since it's happening on the exhaust cycle
* set ignition_mode X
* offset 440
2017-03-27 19:19:58 -07:00
*/
ignition_mode_e ignitionMode;
/**
* this value could be used to offset the whole ignition timing table by a constant
* offset 444
2017-03-27 19:19:58 -07:00
*/
angle_t ignitionOffset;
/**
* offset 448
2017-03-27 19:19:58 -07:00
*/
timing_mode_e timingMode;
/**
* This value is used in 'fixed timing' mode, i.e. constant timing
* This mode is useful for instance while adjusting distributor location
* offset 452
2017-03-27 19:19:58 -07:00
*/
angle_t fixedModeTiming;
/**
* Angle between Top Dead Center (TDC) and the first trigger event.
* Knowing this angle allows us to control timing and other angles in reference to TDC.
* set global_trigger_offset_angle X
* offset 456
2017-03-27 19:19:58 -07:00
*/
angle_t globalTriggerAngleOffset;
/**
* Coefficient of input voltage dividers on your PCB
* offset 460
2017-03-27 19:19:58 -07:00
*/
float analogInputDividerCoefficient;
/**
* Battery Voltage input resistor divider coefficient
* offset 464
2017-03-27 19:19:58 -07:00
*/
float vbattDividerCoeff;
/**
* Cooling fan turn-on temperature threshold, in Celsuis
* offset 468
2017-03-27 19:19:58 -07:00
*/
float fanOnTemperature;
/**
* Cooling fan turn-off temperature threshold, in Celsuis
* offset 472
2017-03-27 19:19:58 -07:00
*/
float fanOffTemperature;
/**
* This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h
* offset 476
2017-03-27 19:19:58 -07:00
*/
float vehicleSpeedCoef;
/**
* set can_mode X
* offset 480
2017-03-27 19:19:58 -07:00
*/
can_nbc_e canNbcType;
/**
* CANbus thread period, ms
* offset 484
2017-03-27 19:19:58 -07:00
*/
2019-02-10 19:47:49 -08:00
int canSleepPeriodMs;
2017-03-27 19:19:58 -07:00
/**
2019-03-16 08:14:52 -07:00
* '4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2
2017-03-27 19:19:58 -07:00
* See engineCycle
* set operation_mode X
* offset 488
2017-03-27 19:19:58 -07:00
*/
operation_mode_e operationMode;
/**
* offset 492
2017-03-27 19:19:58 -07:00
*/
display_mode_e displayMode;
/**
* offset 496
2017-03-27 19:19:58 -07:00
*/
log_format_e logFormat;
/**
* offset 500
2017-03-27 19:19:58 -07:00
*/
int byFirmwareVersion;
/**
* offset 504
2017-03-27 19:19:58 -07:00
*/
int HD44780width;
/**
* offset 508
2017-03-27 19:19:58 -07:00
*/
int HD44780height;
/**
2019-05-05 14:21:36 -07:00
* First TPS, single channel so far. See aslo pedalPositionAdcChannel
* offset 512
2017-03-27 19:19:58 -07:00
*/
2019-05-05 09:02:42 -07:00
adc_channel_e tps1_1AdcChannel;
2017-03-27 19:19:58 -07:00
/**
* offset 513
*/
adc_channel_e vbattAdcChannel;
/**
* offset 514
*/
adc_channel_e fuelLevelSensor;
/**
2019-05-05 14:21:36 -07:00
* Second throttle body position sensor, single channel so far
* offset 515
*/
2019-05-05 09:02:42 -07:00
adc_channel_e tps2_1AdcChannel;
/**
* offset 516
2017-03-27 19:19:58 -07:00
*/
int overrideCrankingIgnition;
/**
* offset 520
2017-03-27 19:19:58 -07:00
*/
int sensorChartFrequency;
/**
* offset 524
2017-03-27 19:19:58 -07:00
*/
trigger_config_s trigger;
/**
* offset 540
2017-03-27 19:19:58 -07:00
*/
spi_device_e hip9011SpiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 541
*/
2019-05-25 12:35:25 -07:00
adc_channel_e high_fuel_pressure_sensor_1;
/**
* offset 542
*/
adc_channel_e high_fuel_pressure_sensor_2;
/**
* offset 543
*/
uint8_t unusedSpiPadding1;
2017-03-27 19:19:58 -07:00
/**
2018-01-06 07:53:15 -08:00
* set global_fuel_correction X
* offset 544
2017-03-27 19:19:58 -07:00
*/
float globalFuelCorrection;
/**
* offset 548
2017-03-27 19:19:58 -07:00
*/
2017-06-12 05:18:19 -07:00
float adcVcc;
2017-03-27 19:19:58 -07:00
/**
* maximum total number of degrees to subtract from ignition advance
* when knocking
* offset 552
2017-03-27 19:19:58 -07:00
*/
float maxKnockSubDeg;
/**
* See hasMafSensor
* offset 556
2017-03-27 19:19:58 -07:00
*/
adc_channel_e mafAdcChannel;
/**
* offset 557
*/
2019-04-14 15:12:15 -07:00
uint8_t unusedAlignMaf[3];
/**
* offset 560
2017-03-27 19:19:58 -07:00
*/
afr_sensor_s afr;
/**
* Electronic throttle pedal position input
2019-05-05 09:02:42 -07:00
* Single channel so far
* See also tps1_1AdcChannel
* offset 580
2017-03-27 19:19:58 -07:00
*/
adc_channel_e throttlePedalPositionAdcChannel;
/**
* offset 581
*/
brain_pin_e tle6240_cs;
/**
* offset 582
*/
pin_output_mode_e tle6240_csPinMode;
/**
* offset 583
*/
uint8_t unusedt;
2017-03-27 19:19:58 -07:00
/**
* @see hasBaroSensor
* offset 584
2017-03-27 19:19:58 -07:00
*/
air_pressure_sensor_config_s baroSensor;
/**
* offset 600
2017-03-27 19:19:58 -07:00
*/
board_configuration_s bc;
/**
offset 1464 bit 0 */
2017-03-27 19:19:58 -07:00
bool vvtDisplayInverted : 1;
/**
offset 1464 bit 1 */
2017-03-27 19:19:58 -07:00
bool fuelClosedLoopCorrectionEnabled : 1;
/**
2018-06-15 17:45:06 -07:00
* Print details into rusEfi console
offset 1464 bit 2 */
2017-05-16 19:13:40 -07:00
bool isVerboseIAC : 1;
2017-03-27 19:19:58 -07:00
/**
2017-05-29 20:13:02 -07:00
* enable verbose_etb
offset 1464 bit 3 */
2017-05-24 21:38:37 -07:00
bool isVerboseETB : 1;
2017-03-27 19:19:58 -07:00
/**
2019-02-09 14:17:23 -08:00
* 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.
offset 1464 bit 4 */
2017-03-27 19:19:58 -07:00
bool useConstantDwellDuringCranking : 1;
/**
* This options enables data for 'engine sniffer' tab in console, which comes at some CPU price
offset 1464 bit 5 */
2017-03-27 19:19:58 -07:00
bool isEngineChartEnabled : 1;
/**
offset 1464 bit 6 */
2017-05-25 05:28:30 -07:00
bool silentTriggerError : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 7 */
2017-06-12 15:22:25 -07:00
bool useLinearCltSensor : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 8 */
2017-03-27 19:19:58 -07:00
bool canReadEnabled : 1;
/**
offset 1464 bit 9 */
2017-03-27 19:19:58 -07:00
bool canWriteEnabled : 1;
/**
offset 1464 bit 10 */
2017-06-12 15:22:25 -07:00
bool useLinearIatSensor : 1;
2017-03-27 19:19:58 -07:00
/**
2017-08-03 18:09:32 -07:00
* See fsioTimingAdjustment
offset 1464 bit 11 */
2017-07-25 17:32:54 -07:00
bool useFSIO16ForTimingAdjustment : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 12 */
2017-08-28 18:00:36 -07:00
bool tachPulseDurationAsDutyCycle : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 13 */
2017-03-27 19:19:58 -07:00
bool isAlternatorControlEnabled : 1;
/**
offset 1464 bit 14 */
2017-10-16 11:52:42 -07:00
bool invertPrimaryTriggerSignal : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 15 */
2017-10-16 11:52:42 -07:00
bool invertSecondaryTriggerSignal : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1464 bit 16 */
2017-03-27 19:19:58 -07:00
bool cutFuelOnHardLimit : 1;
/**
offset 1464 bit 17 */
2017-03-27 19:19:58 -07:00
bool cutSparkOnHardLimit : 1;
/**
offset 1464 bit 18 */
2017-03-27 19:19:58 -07:00
bool step1fuelCutEnable : 1;
/**
offset 1464 bit 19 */
2017-03-27 19:19:58 -07:00
bool step1SparkCutEnable : 1;
/**
offset 1464 bit 20 */
2017-03-27 19:19:58 -07:00
bool hasFrequencyReportingMapSensor : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 21 */
2018-03-18 09:15:51 -07:00
bool useFSIO8ForServo1 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 22 */
2018-03-18 09:15:51 -07:00
bool useFSIO9ForServo2 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 23 */
2018-03-18 09:15:51 -07:00
bool useFSIO10ForServo3 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 24 */
2018-03-18 09:15:51 -07:00
bool useFSIO11ForServo4 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 25 */
2018-03-18 09:15:51 -07:00
bool useFSIO12ForServo5 : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1464 bit 26 */
2018-07-29 15:02:37 -07:00
bool useFSIO15ForIdleRpmAdjustment : 1;
2018-01-02 18:25:40 -08:00
/**
* Sometimes we just have to shut the engine down. Use carefully!
offset 1464 bit 27 */
bool useFSIO5ForCriticalIssueEngineStop : 1;
/**
* Sometimes we have to miss injection on purpose to attract driver's attention
offset 1464 bit 28 */
bool useFSIO4ForSeriousEngineWarning : 1;
/**
offset 1464 bit 29 */
bool unused_bit_1472_29 : 1;
/**
offset 1464 bit 30 */
bool unused_bit_1472_30 : 1;
2017-03-27 19:19:58 -07:00
/**
* offset 1468
2017-03-27 19:19:58 -07:00
*/
adc_channel_e hipOutputChannel;
/**
* offset 1469
*/
uint8_t unusedh[3];
/**
2019-04-04 18:45:18 -07:00
* See also idleRpmPid
* offset 1472
2017-03-27 19:19:58 -07:00
*/
idle_mode_e idleMode;
/**
* enable injection
offset 1476 bit 0 */
2017-03-27 19:19:58 -07:00
bool isInjectionEnabled : 1;
/**
* enable ignition
offset 1476 bit 1 */
2017-03-27 19:19:58 -07:00
bool isIgnitionEnabled : 1;
/**
* If TPS above 95% no fuel would be injected during cranking
* enable cylinder_cleanup
offset 1476 bit 2 */
2017-03-27 19:19:58 -07:00
bool isCylinderCleanupEnabled : 1;
/**
offset 1476 bit 3 */
2017-03-27 19:19:58 -07:00
bool secondTriggerChannelEnabled : 1;
/**
offset 1476 bit 4 */
2017-03-27 19:19:58 -07:00
bool needSecondTriggerInputDeprecated : 1;
/**
offset 1476 bit 5 */
2017-03-27 19:19:58 -07:00
bool isMapAveragingEnabled : 1;
/**
offset 1476 bit 6 */
2017-12-06 15:46:31 -08:00
bool overrideCrankingIacSetting : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1476 bit 7 */
2017-12-11 07:14:42 -08:00
bool useSeparateAdvanceForIdle : 1;
2017-03-27 19:19:58 -07:00
/**
offset 1476 bit 8 */
2017-03-27 19:19:58 -07:00
bool isTunerStudioEnabled : 1;
/**
offset 1476 bit 9 */
2017-03-27 19:19:58 -07:00
bool isWaveAnalyzerEnabled : 1;
/**
offset 1476 bit 10 */
2017-12-11 07:14:42 -08:00
bool useSeparateVeForIdle : 1;
2017-03-27 19:19:58 -07:00
/**
* enable trigger_details
offset 1476 bit 11 */
2017-03-27 19:19:58 -07:00
bool isPrintTriggerSynchDetails : 1;
/**
* Usually if we have no trigger events that means engine is stopped
* Unless we are troubleshooting and spinning the engine by hand - this case a longer
* delay is needed
offset 1476 bit 12 */
2017-03-27 19:19:58 -07:00
bool isManualSpinningMode : 1;
/**
* This is needed if batched injection and individual injector wiring
* enable two_wire_batch_injection
offset 1476 bit 13 */
2017-03-27 19:19:58 -07:00
bool twoWireBatchInjection : 1;
/**
* VR sensors are only precise on rising front
* enable trigger_only_front
offset 1476 bit 14 */
2017-03-27 19:19:58 -07:00
bool useOnlyRisingEdgeForTrigger : 1;
/**
* This is needed if batched igniton (waster spark) and individual coil wiring
offset 1476 bit 15 */
2017-03-27 19:19:58 -07:00
bool twoWireBatchIgnition : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1476 bit 16 */
2018-01-02 18:25:40 -08:00
bool useFixedBaroCorrFromMap : 1;
/**
offset 1476 bit 17 */
bool useSeparateAdvanceForCranking : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1476 bit 18 */
bool useAdvanceCorrectionsForCranking : 1;
2018-01-02 18:25:40 -08:00
/**
2019-04-12 15:24:43 -07:00
* This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode
offset 1476 bit 19 */
2018-09-25 12:48:58 -07:00
bool useTPSAdvanceTable : 1;
2018-01-02 18:25:40 -08:00
/**
offset 1476 bit 20 */
2018-01-02 18:25:40 -08:00
bool unused_1484_bit_20 : 1;
/**
offset 1476 bit 21 */
2018-01-02 18:25:40 -08:00
bool unused_1484_bit_21 : 1;
2017-03-27 19:19:58 -07:00
/**
* offset 1480
2017-03-27 19:19:58 -07:00
*/
uint32_t engineChartSize;
/**
2018-01-03 04:59:59 -08:00
* Relative to the target idle RPM
* offset 1484
2017-03-27 19:19:58 -07:00
*/
2017-12-26 21:26:40 -08:00
int16_t idlePidRpmUpperLimit;
/**
2018-01-03 04:59:59 -08:00
* Prime injection pulse falloff temperature threshold, in Celsuis
* offset 1486
2017-12-26 21:26:40 -08:00
*/
2018-01-03 04:59:59 -08:00
int16_t primeInjFalloffTemperature;
2017-03-27 19:19:58 -07:00
/**
* A/C button input handled as analog input
* offset 1488
2017-03-27 19:19:58 -07:00
*/
adc_channel_e acSwitchAdc;
/**
* offset 1489
*/
uint8_t unusuedsw[3];
2017-03-27 19:19:58 -07:00
/**
* At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.
* offset 1492
2017-03-27 19:19:58 -07:00
*/
int ignMathCalculateAtIndex;
2017-03-27 19:19:58 -07:00
/**
* offset 1496
2017-03-27 19:19:58 -07:00
*/
int16_t acCutoffLowRpm;
/**
* offset 1498
2017-03-27 19:19:58 -07:00
*/
int16_t acCutoffHighRpm;
/**
* offset 1500
2017-03-27 19:19:58 -07:00
*/
int16_t acIdleRpmBump;
/**
* set warningPeriod X
* offset 1502
2017-03-27 19:19:58 -07:00
*/
int16_t warningPeriod;
/**
* offset 1504
2017-03-27 19:19:58 -07:00
*/
adc_channel_e vRefAdcChannel;
/**
* offset 1505
*/
uint8_t unusuedvref[3];
/**
* offset 1508
2017-03-27 19:19:58 -07:00
*/
float knockDetectionWindowStart;
/**
* offset 1512
2017-03-27 19:19:58 -07:00
*/
float knockDetectionWindowEnd;
/**
* offset 1516
2017-03-27 19:19:58 -07:00
*/
float idleStepperReactionTime;
/**
* offset 1520
2017-03-27 19:19:58 -07:00
*/
float knockVThreshold;
/**
* offset 1524
2017-03-27 19:19:58 -07:00
*/
2017-06-25 23:14:31 -07:00
pin_input_mode_e fsioInputModes[FSIO_COMMAND_COUNT];
2017-03-27 19:19:58 -07:00
/**
* offset 1540
2017-03-27 19:19:58 -07:00
*/
2019-03-02 10:21:12 -08:00
int alFIn[3];
2017-03-27 19:19:58 -07:00
/**
* offset 1552
2017-03-27 19:19:58 -07:00
*/
int idleStepperTotalSteps;
/**
2017-05-12 13:28:56 -07:00
* TODO: finish this #413
* offset 1556
2017-03-27 19:19:58 -07:00
*/
float noAccelAfterHardLimitPeriodSecs;
/**
* At what trigger index should some MAP-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.
* offset 1560
2017-03-27 19:19:58 -07:00
*/
int mapAveragingSchedulingAtIndex;
/**
* offset 1564
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
float baroCorrPressureBins[BARO_CORR_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1580
2017-03-27 19:19:58 -07:00
*/
2015-07-10 06:01:56 -07:00
float baroCorrRpmBins[BARO_CORR_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1596
2017-03-27 19:19:58 -07:00
*/
baro_corr_table_t baroCorrTable;
/**
* Cranking fuel correction coefficient based on TPS
* offset 1660
2017-03-27 19:19:58 -07:00
*/
2015-08-18 11:03:02 -07:00
float crankingTpsCoef[CRANKING_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1692
2017-03-27 19:19:58 -07:00
*/
2015-08-18 11:03:02 -07:00
float crankingTpsBins[CRANKING_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1724
2017-03-27 19:19:58 -07:00
*/
float tachPulseDuractionMs;
/**
* Trigger cycle index at which we start tach pulse (performance consideration)
* offset 1728
2017-03-27 19:19:58 -07:00
*/
int tachPulseTriggerIndex;
/**
* offset 1732
2017-03-27 19:19:58 -07:00
*/
float wwaeTau;
2017-03-27 19:19:58 -07:00
/**
* offset 1736
2017-03-27 19:19:58 -07:00
*/
pid_s alternatorControl;
2017-03-27 19:19:58 -07:00
/**
* offset 1756
2017-03-27 19:19:58 -07:00
*/
pid_s etb;
2017-03-27 19:19:58 -07:00
/**
* offset 1776
2017-03-27 19:19:58 -07:00
*/
pid_s warmupAfrPid;
2017-03-27 19:19:58 -07:00
/**
* kPa value which is too low to be true
* offset 1796
2017-03-27 19:19:58 -07:00
*/
float mapErrorDetectionTooLow;
/**
* kPa value which is too high to be true
* offset 1800
2017-03-27 19:19:58 -07:00
*/
float mapErrorDetectionTooHigh;
/**
* RPMs prior to step1rpm point where ignition advance is retarded
* offset 1804
2017-03-27 19:19:58 -07:00
*/
int step1RpmWindow;
/**
2018-01-07 09:11:49 -08:00
* See cltIdleRpmBins
* offset 1808
2017-03-27 19:19:58 -07:00
*/
pid_s idleRpmPid;
/**
2019-01-04 18:54:57 -08:00
* Wall wetting/evaporation factor/Tau factor/fuel film
* offset 1828
2017-03-27 19:19:58 -07:00
*/
float wwaeBeta;
2017-03-27 19:19:58 -07:00
/**
* blue LED on discovery by default
* offset 1832
2017-03-27 19:19:58 -07:00
*/
2018-07-26 12:51:06 -07:00
brain_pin_e communicationLedPin;
2017-03-27 19:19:58 -07:00
/**
* green LED on discovery by default
* offset 1833
2017-03-27 19:19:58 -07:00
*/
2018-07-26 12:51:06 -07:00
brain_pin_e runningLedPin;
2017-03-27 19:19:58 -07:00
/**
* offset 1834
2017-03-27 19:19:58 -07:00
*/
brain_pin_e binarySerialTxPin;
/**
* offset 1835
2017-03-27 19:19:58 -07:00
*/
brain_pin_e binarySerialRxPin;
/**
* offset 1836
*/
brain_pin_e auxValves[AUX_DIGITAL_VALVE_COUNT];
2017-03-27 19:19:58 -07:00
/**
* todo: finish pin migration from hard-coded to configurable?
* offset 1838
2017-03-27 19:19:58 -07:00
*/
brain_pin_e consoleSerialTxPin;
/**
* todo: finish pin migration from hard-coded to configurable?
* offset 1839
2017-03-27 19:19:58 -07:00
*/
brain_pin_e consoleSerialRxPin;
/**
* Knock sensor output knock detection threshold depending on current RPM
* offset 1840
2017-03-27 19:19:58 -07:00
*/
2016-01-01 15:01:46 -08:00
float knockNoise[ENGINE_NOISE_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1872
2017-03-27 19:19:58 -07:00
*/
2016-01-01 15:01:46 -08:00
float knockNoiseRpmBins[ENGINE_NOISE_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 1904
2017-03-27 19:19:58 -07:00
*/
float throttlePedalUpVoltage;
/**
* Pedal in the floor
* offset 1908
*/
float throttlePedalWOTVoltage;
2017-06-13 07:40:16 -07:00
/**
* on ECU start turn fuel pump on to build fuel pressure
* offset 1912
2017-06-13 07:40:16 -07:00
*/
int16_t startUpFuelPumpDuration;
/**
2019-03-22 20:00:21 -07:00
* If RPM is close enough let's leave IAC alone, and maybe engage timing PID correction
* offset 1914
*/
2017-12-26 21:26:40 -08:00
int16_t idlePidRpmDeadZone;
2017-03-27 19:19:58 -07:00
/**
* CLT-based target RPM for automatic idle controller
* offset 1916
2017-03-27 19:19:58 -07:00
*/
2015-11-18 18:02:51 -08:00
float cltIdleRpmBins[CLT_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
2018-01-07 09:11:49 -08:00
* See idleRpmPid
* offset 1980
2017-03-27 19:19:58 -07:00
*/
2015-11-18 16:01:34 -08:00
float cltIdleRpm[CLT_CURVE_SIZE];
2017-03-27 19:19:58 -07:00
/**
2017-06-11 12:36:23 -07:00
* set targetvbatt VOLTS
* offset 2044
2017-03-27 19:19:58 -07:00
*/
float targetVBatt;
/**
* Turn off alternator output above specified TPS
* offset 2048
2017-03-27 19:19:58 -07:00
*/
float alternatorOffAboveTps;
/**
2019-03-21 17:26:14 -07:00
* Prime pulse for cold engine, duration in ms
* Linear interpolation between -40F/-40C and fallout temperature
*
* See also isFasterEngineSpinUpEnabled
2018-03-04 20:21:43 -08:00
* set cranking_priming_pulse X
* offset 2052
2017-03-27 19:19:58 -07:00
*/
2017-07-15 12:36:49 -07:00
float startOfCrankingPrimingPulse;
/**
* offset 2056
2017-07-15 12:36:49 -07:00
*/
2017-07-31 12:35:12 -07:00
int16_t afterCrankingIACtaperDuration;
/**
* Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value
* offset 2058
2017-07-31 12:35:12 -07:00
*/
int16_t iacByTpsTaper;
/**
2019-04-11 19:15:06 -07:00
* RED led on Discovery by default.
* offset 2060
*/
brain_pin_e fatalErrorPin;
/**
* offset 2061
*/
brain_pin_e warningLedPin;
/**
* offset 2062
*/
2019-04-11 19:15:06 -07:00
brain_pin_e unused1234234;
/**
* offset 2063
*/
2017-08-16 23:32:06 -07:00
brain_pin_e LIS302DLCsPin;
/**
2019-03-16 08:14:52 -07:00
* How many engine cycles to consider?
* offset 2064
2017-03-27 19:19:58 -07:00
*/
int tpsAccelLength;
/**
2019-04-20 11:54:16 -07:00
* Maximum delta in TPS percentage over the 'length'. Actual TPS change has to be above this value in order to TPS/TPS acceleration to kick in.
* offset 2068
2017-03-27 19:19:58 -07:00
*/
float tpsAccelEnrichmentThreshold;
/**
2019-01-25 19:19:44 -08:00
* angle between cam sensor and VVT zero position
2017-03-27 19:19:58 -07:00
* set vvt_offset X
* offset 2072
2017-03-27 19:19:58 -07:00
*/
float vvtOffset;
/**
* offset 2076
2017-03-27 19:19:58 -07:00
*/
int engineLoadAccelLength;
/**
* offset 2080
2017-03-27 19:19:58 -07:00
*/
float engineLoadDecelEnleanmentThreshold;
/**
* offset 2084
2017-03-27 19:19:58 -07:00
*/
float engineLoadDecelEnleanmentMultiplier;
/**
* offset 2088
2017-03-27 19:19:58 -07:00
*/
float engineLoadAccelEnrichmentThreshold;
/**
* offset 2092
2017-03-27 19:19:58 -07:00
*/
float engineLoadAccelEnrichmentMultiplier;
/**
* offset 2096
2017-03-27 19:19:58 -07:00
*/
uint32_t uartConsoleSerialSpeed;
/**
* offset 2100
2017-03-27 19:19:58 -07:00
*/
float tpsDecelEnleanmentThreshold;
/**
* offset 2104
2017-03-27 19:19:58 -07:00
*/
float tpsDecelEnleanmentMultiplier;
/**
* ExpAverage alpha coefficient
* offset 2108
2017-03-27 19:19:58 -07:00
*/
float slowAdcAlpha;
/**
2019-04-20 11:54:16 -07:00
* See http://rusefi.com/s/debugmode
*
2017-06-07 20:12:04 -07:00
* set debug_mode X
* offset 2112
2017-03-27 19:19:58 -07:00
*/
debug_mode_e debugMode;
/**
* CLT-based target AFR for PID-based control
* offset 2116
2017-03-27 19:19:58 -07:00
*/
2016-02-10 10:01:49 -08:00
float warmupTargetAfrBins[WARMUP_TARGET_AFR_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 2132
2017-03-27 19:19:58 -07:00
*/
2016-02-10 10:01:49 -08:00
float warmupTargetAfr[WARMUP_TARGET_AFR_SIZE];
2017-03-27 19:19:58 -07:00
/**
* offset 2148
2017-03-27 19:19:58 -07:00
*/
float warmupAfrThreshold;
/**
* kPa value at which we need to cut fuel and spark, 0 if not enabled
* offset 2152
2017-03-27 19:19:58 -07:00
*/
float boostCutPressure;
/**
* offset 2156
2017-03-27 19:19:58 -07:00
*/
2016-03-12 07:01:55 -08:00
float mapAccelTaperBins[MAP_ACCEL_TAPER];
2017-03-27 19:19:58 -07:00
/**
* offset 2188
2017-03-27 19:19:58 -07:00
*/
2016-03-12 07:01:55 -08:00
float mapAccelTaperMult[MAP_ACCEL_TAPER];
2017-03-27 19:19:58 -07:00
/**
2017-08-06 16:43:01 -07:00
* todo: rename to fsioAnalogInputs
* offset 2220
2017-03-27 19:19:58 -07:00
*/
2017-08-06 16:43:01 -07:00
adc_channel_e fsioAdc[FSIO_ANALOG_INPUT_COUNT];
2017-03-27 19:19:58 -07:00
/**
* Fixed timing, useful for TDC testing
* offset 2224
2017-03-27 19:19:58 -07:00
*/
2018-11-29 21:17:55 -08:00
float fixedTiming;
/**
* MAP voltage for low point
* offset 2228
2018-11-29 21:17:55 -08:00
*/
float mapLowValueVoltage;
/**
* MAP voltage for low point
* offset 2232
2018-11-29 21:17:55 -08:00
*/
float mapHighValueVoltage;
/**
* EGO value correction
* offset 2236
2018-11-29 21:17:55 -08:00
*/
float egoValueShift;
/**
* offset 2240
*/
2019-05-02 08:21:35 -07:00
smart_pin_e auxPidPins[AUX_PID_COUNT];
2018-11-29 21:17:55 -08:00
/**
2019-01-10 13:37:52 -08:00
* 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.
2019-01-10 14:05:03 -08:00
* TODO #660
* offset 2244
2018-11-29 21:17:55 -08:00
*/
brain_input_pin_e camInput;
/**
* offset 2245
*/
pin_output_mode_e cj125CsPinMode;
/**
* This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin
* offset 2246
*/
brain_pin_e dizzySparkOutputPin;
/**
* offset 2247
*/
pin_output_mode_e dizzySparkOutputPinMode;
2018-11-29 21:17:55 -08:00
/**
* IAC position during cranking
* offset 2248
2018-11-29 21:17:55 -08:00
*/
int crankingIACposition;
/**
* offset 2252
2018-11-29 21:17:55 -08:00
*/
float tChargeMinRpmMinTps;
/**
* offset 2256
2018-11-29 21:17:55 -08:00
*/
float tChargeMinRpmMaxTps;
/**
* offset 2260
2018-11-29 21:17:55 -08:00
*/
float tChargeMaxRpmMinTps;
/**
* offset 2264
2018-11-29 21:17:55 -08:00
*/
float tChargeMaxRpmMaxTps;
/**
* offset 2268
2018-11-29 21:17:55 -08:00
*/
fsio_pwm_freq_t auxPidFrequency[AUX_PID_COUNT];
/**
* offset 2276
2018-11-29 21:17:55 -08:00
*/
int alternatorPwmFrequency;
/**
* offset 2280
2018-11-29 21:17:55 -08:00
*/
mass_storage_e storageMode;
/**
* offset 2284
2018-11-29 21:17:55 -08:00
*/
spi_device_e cj125SpiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 2285
*/
uint8_t unusedSpiPadding3[3];
2018-11-29 21:17:55 -08:00
/**
* Narrow Band WBO Approximation
* offset 2288
2018-11-29 21:17:55 -08:00
*/
float narrowToWideOxygenBins[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE];
/**
* offset 2320
2018-11-29 21:17:55 -08:00
*/
float narrowToWideOxygen[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE];
/**
* set vvt_mode X
* offset 2352
2018-11-29 21:17:55 -08:00
*/
vvt_mode_e vvtMode;
/**
* offset 2356
2018-11-29 21:17:55 -08:00
*/
bi_quard_s biQuad;
/**
* CLT-based timing correction
* offset 2376
2018-11-29 21:17:55 -08:00
*/
float cltTimingBins[CLT_TIMING_CURVE_SIZE];
/**
* offset 2408
2018-11-29 21:17:55 -08:00
*/
float cltTimingExtra[CLT_TIMING_CURVE_SIZE];
/**
* offset 2440
2018-11-29 21:17:55 -08:00
*/
int nbVvtIndex;
/**
* offset 2444
2018-11-29 21:17:55 -08:00
*/
float autoTuneCltThreshold;
/**
* offset 2448
2018-11-29 21:17:55 -08:00
*/
float autoTuneTpsRocThreshold;
/**
* offset 2452
2018-11-29 21:17:55 -08:00
*/
float autoTuneTpsQuietPeriod;
/**
* offset 2456
2018-11-29 21:17:55 -08:00
*/
float postCrankingTargetClt;
/**
* Fuel multiplier taper, see also postCrankingDurationSec
* offset 2460
2018-11-29 21:17:55 -08:00
*/
float postCrankingFactor;
/**
* See also postCrankingFactor
* offset 2464
2018-11-29 21:17:55 -08:00
*/
float postCrankingDurationSec;
/**
* todo: finish implementation #332
* offset 2468
2018-11-29 21:17:55 -08:00
*/
ThermistorConf auxTempSensor1;
/**
* todo: finish implementation #332
* offset 2500
2018-11-29 21:17:55 -08:00
*/
ThermistorConf auxTempSensor2;
/**
* offset 2532
2018-11-29 21:17:55 -08:00
*/
int16_t fuelClosedLoopCltThreshold;
/**
* offset 2534
2018-11-29 21:17:55 -08:00
*/
int16_t fuelClosedLoopTpsThreshold;
/**
* offset 2536
2018-11-29 21:17:55 -08:00
*/
int16_t fuelClosedLoopRpmThreshold;
/**
* offset 2538
2018-11-29 21:17:55 -08:00
*/
int16_t etbFreq;
/**
* offset 2540
2018-11-29 21:17:55 -08:00
*/
pid_s fuelClosedLoopPid;
/**
* offset 2560
2018-11-29 21:17:55 -08:00
*/
float fuelClosedLoopAfrHighThreshold;
/**
* per-cylinder timing correction
* offset 2564
2018-11-29 21:17:55 -08:00
*/
cfg_float_t_1f timing_offset_cylinder[IGNITION_PIN_COUNT];
2018-11-29 21:17:55 -08:00
/**
* offset 2612
2018-11-29 21:17:55 -08:00
*/
float idlePidActivationTime;
2018-11-29 21:17:55 -08:00
/**
* offset 2616
2018-11-29 21:17:55 -08:00
*/
spi_device_e sdCardSpiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 2617
*/
uint8_t unusedSpiPadding4[3];
2018-11-29 21:17:55 -08:00
/**
* offset 2620
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi1SckMode;
2018-11-29 21:17:55 -08:00
/**
* offset 2621
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi1MosiMode;
2018-11-29 21:17:55 -08:00
/**
* offset 2622
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi1MisoMode;
2018-11-29 21:17:55 -08:00
/**
* offset 2623
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi2SckMode;
/**
* offset 2624
*/
pin_mode_e spi2MosiMode;
2018-11-29 21:17:55 -08:00
/**
* offset 2625
*/
pin_mode_e spi2MisoMode;
/**
* offset 2626
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi3SckMode;
/**
* offset 2627
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi3MosiMode;
/**
* offset 2628
2018-11-29 21:17:55 -08:00
*/
pin_mode_e spi3MisoMode;
/**
* offset 2629
2018-11-29 21:17:55 -08:00
*/
pin_output_mode_e stepperEnablePinMode;
2018-11-29 21:17:55 -08:00
/**
2019-05-25 10:47:09 -07:00
* ResetB
* offset 2630
2018-11-29 21:17:55 -08:00
*/
2019-05-25 10:47:09 -07:00
brain_pin_e mc33816_rstb;
/**
* offset 2631
*/
brain_pin_e mc33816_driven;
2018-11-29 21:17:55 -08:00
/**
* offset 2632
2018-11-29 21:17:55 -08:00
*/
brain_pin_e brakePedalPin;
2018-11-29 21:17:55 -08:00
/**
* lambda input
* offset 2633
2018-11-29 21:17:55 -08:00
*/
adc_channel_e cj125ua;
2018-11-29 21:17:55 -08:00
/**
* heater input
* offset 2634
*/
adc_channel_e cj125ur;
/**
* offset 2635
*/
pin_input_mode_e brakePedalPinMode;
/**
* offset 2636
2018-11-29 21:17:55 -08:00
*/
pid_s auxPid[AUX_PID_COUNT];
/**
* offset 2716
2018-11-29 21:17:55 -08:00
*/
oil_pressure_config_s oilPressure;
/**
* offset 2736
2018-11-29 21:17:55 -08:00
*/
spi_device_e accelerometerSpiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 2737
*/
uint8_t unusedSpiPadding5[3];
2018-11-29 21:17:55 -08:00
/**
* offset 2740
2018-11-29 21:17:55 -08:00
*/
float fsioCurve1Bins[FSIO_CURVE_16];
/**
* offset 2804
2018-11-29 21:17:55 -08:00
*/
float fsioCurve1[FSIO_CURVE_16];
/**
* offset 2868
2018-11-29 21:17:55 -08:00
*/
float fsioCurve2Bins[FSIO_CURVE_16];
/**
* offset 2932
2018-11-29 21:17:55 -08:00
*/
float fsioCurve2[FSIO_CURVE_16];
/**
* offset 2996
2018-11-29 21:17:55 -08:00
*/
float fsioCurve3Bins[FSIO_CURVE_8];
/**
* offset 3028
2018-11-29 21:17:55 -08:00
*/
float fsioCurve3[FSIO_CURVE_8];
/**
* offset 3060
2018-11-29 21:17:55 -08:00
*/
float fsioCurve4Bins[FSIO_CURVE_8];
/**
* offset 3092
2018-11-29 21:17:55 -08:00
*/
float fsioCurve4[FSIO_CURVE_8];
/**
* offset 3124
2018-11-29 21:17:55 -08:00
*/
brain_input_pin_e flexFuelSensor;
/**
* offset 3125
2018-11-29 21:17:55 -08:00
*/
brain_pin_e test557pin;
/**
* offset 3126
*/
pin_output_mode_e stepperDirectionPinMode;
/**
* offset 3127
*/
adc_channel_e externalKnockSenseAdc;
/**
* offset 3128
*/
brain_pin_e stepperEnablePin;
/**
* offset 3129
*/
2019-03-25 12:08:32 -07:00
brain_pin_e tle8888_cs;
/**
* offset 3130
*/
2019-03-25 17:30:36 -07:00
pin_output_mode_e tle8888_csPinMode;
/**
* offset 3131
*/
brain_pin_e mc33816_cs;
2018-11-29 21:17:55 -08:00
/**
* Optional timing advance table for Cranking (see useSeparateAdvanceForCranking)
* offset 3132
2018-11-29 21:17:55 -08:00
*/
float crankingAdvanceBins[CRANKING_ADVANCE_CURVE_SIZE];
/**
* Optional timing advance table for Cranking (see useSeparateAdvanceForCranking)
* offset 3148
2018-11-29 21:17:55 -08:00
*/
float crankingAdvance[CRANKING_ADVANCE_CURVE_SIZE];
/**
* todo: more comments
* offset 3164
2018-11-29 21:17:55 -08:00
*/
brain_pin_e servoOutputPins[SERVO_COUNT];
/**
* offset 3172
2018-11-29 21:17:55 -08:00
*/
int16_t coastingFuelCutRpmHigh;
/**
* offset 3174
2018-11-29 21:17:55 -08:00
*/
int16_t coastingFuelCutRpmLow;
/**
* percent between 0 and 100
* offset 3176
2018-11-29 21:17:55 -08:00
*/
int16_t coastingFuelCutTps;
/**
* Fuel cutoff is deactivated if CLT<threshold
* offset 3178
2018-11-29 21:17:55 -08:00
*/
int16_t coastingFuelCutClt;
/**
* Increases PID reaction for RPM<target by adding extra percent to PID-error
* offset 3180
2018-11-29 21:17:55 -08:00
*/
int16_t pidExtraForLowRpm;
/**
* maximum manifold pressure for fuel cut
* offset 3182
2018-11-29 21:17:55 -08:00
*/
int16_t coastingFuelCutMap;
/**
* CLT-based idle position for coasting (used in Auto-PID Idle mode)
* offset 3184
2018-11-29 21:17:55 -08:00
*/
float iacCoastingBins[CLT_CURVE_SIZE];
/**
* CLT-based idle position for coasting (used in Auto-PID Idle mode)
* offset 3248
2018-11-29 21:17:55 -08:00
*/
float iacCoasting[CLT_CURVE_SIZE];
/**
* offset 3312
2018-11-29 21:17:55 -08:00
*/
ignition_tps_table_t ignitionTpsTable;
/**
* offset 3824
2018-11-29 21:17:55 -08:00
*/
float ignitionTpsBins[IGN_TPS_COUNT];
/**
* offset 3888
2018-11-29 21:17:55 -08:00
*/
float tChargeAirCoefMin;
/**
* offset 3892
2018-11-29 21:17:55 -08:00
*/
float tChargeAirCoefMax;
/**
* offset 3896
2018-11-29 21:17:55 -08:00
*/
float tChargeAirFlowMax;
/**
* offset 3900
2018-11-29 21:17:55 -08:00
*/
float tChargeAirIncrLimit;
/**
* offset 3904
2018-11-29 21:17:55 -08:00
*/
float tChargeAirDecrLimit;
/**
* offset 3908
2018-11-29 21:17:55 -08:00
*/
tChargeMode_e tChargeMode;
/**
2018-12-09 07:19:47 -08:00
* target TPS value, 0 to 100%
* TODO: use int8 data date once we template interpolation method
* offset 3912
2018-11-29 21:17:55 -08:00
*/
2019-01-07 16:30:35 -08:00
float etbBiasBins[ETB_BIAS_CURVE_LENGTH];
2018-12-09 07:19:47 -08:00
/**
* PWM bias, 0 to 100%
* offset 3944
2018-12-09 07:19:47 -08:00
*/
float etbBiasValues[ETB_BIAS_CURVE_LENGTH];
/**
* offset 3976
2018-12-09 07:19:47 -08:00
*/
2019-01-04 14:18:43 -08:00
float hip9011Gain;
/**
2019-03-02 11:00:32 -08:00
* iTerm min value
* offset 3980
2019-01-04 14:18:43 -08:00
*/
2019-03-02 11:00:32 -08:00
int16_t etb_iTermMin;
/**
* iTerm max value
* offset 3982
*/
int16_t etb_iTermMax;
/**
* offset 3984
*/
float etbDeadband;
/**
* offset 3988
*/
etb_io etb2;
/**
2019-03-22 20:00:21 -07:00
* See useIdleTimingPidControl
* offset 3992
*/
2019-03-22 20:00:21 -07:00
pid_s idleTimingPid;
/**
* The timing correction works only if RPM is close enough, otherwise the IAC correction works
* offset 4012
*/
int16_t idleTimingPidWorkZone;
/**
* If RPM is too perfect, let's leave the advance angle alone to avoid oscillation
* offset 4014
*/
int16_t idleTimingPidDeadZone;
/**
* Added to the work zone for smooth correction falloff
* offset 4016
*/
int16_t idlePidFalloffDeltaRpm;
/**
2019-03-28 19:48:12 -07:00
* A delay in cycles between fuel-enrich. portions
2019-03-22 20:00:21 -07:00
* offset 4018
*/
2019-03-28 19:48:12 -07:00
int16_t tpsAccelFractionPeriod;
2019-03-22 20:00:21 -07:00
/**
2019-03-28 19:48:12 -07:00
* A fraction divisor: 1 or less = entire portion at once, or split into diminishing fractions
2019-03-22 20:00:21 -07:00
* offset 4020
*/
2019-03-28 19:48:12 -07:00
float tpsAccelFractionDivisor;
2019-03-25 12:08:32 -07:00
/**
* offset 4024
*/
2019-03-28 19:48:12 -07:00
spi_device_e tle8888spiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 4025
*/
spi_device_e mc33816spiDevice;
/**
* offset 4026
*/
uint8_t unusedSpiPadding6[2];
2019-03-28 19:48:12 -07:00
/**
* offset 4028
*/
2019-04-13 07:58:52 -07:00
spi_device_e tle6240spiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 4029
*/
uint8_t unusedSpiPadding7[3];
2019-04-13 07:58:52 -07:00
/**
* offset 4032
*/
spi_device_e mc33972spiDevice;
2019-04-14 15:12:15 -07:00
/**
* offset 4033
*/
uint8_t unusedSpiPadding8[3];
2019-04-13 07:58:52 -07:00
/**
* offset 4036
*/
int mainUnusedEnd[611];
2018-11-29 21:17:55 -08:00
/** total size 6480*/
};
typedef struct engine_configuration_s engine_configuration_s;
2018-11-29 21:17:55 -08:00
2018-12-19 18:32:26 -08:00
// start of persistent_config_s
struct persistent_config_s {
2018-11-29 21:17:55 -08:00
/**
* offset 0
*/
engine_configuration_s engineConfiguration;
/**
* CLT-based cranking position multiplier for simple manual idle controller
* offset 6480
*/
float cltCrankingCorrBins[CLT_CRANKING_CURVE_SIZE];
/**
* CLT-based cranking position multiplier for simple manual idle controller
* offset 6512
*/
float cltCrankingCorr[CLT_CRANKING_CURVE_SIZE];
/**
* Optional timing advance table for Idle (see useSeparateAdvanceForIdle)
* offset 6544
*/
float idleAdvanceBins[IDLE_ADVANCE_CURVE_SIZE];
/**
* Optional timing advance table for Idle (see useSeparateAdvanceForIdle)
* offset 6576
*/
float idleAdvance[IDLE_ADVANCE_CURVE_SIZE];
/**
* Optional VE table for Idle (see useSeparateVEForIdle)
* offset 6608
*/
float idleVeBins[IDLE_VE_CURVE_SIZE];
/**
* Optional VE table for Idle (see useSeparateVEForIdle)
* offset 6640
*/
float idleVe[IDLE_VE_CURVE_SIZE];
/**
* offset 6672
*/
le_formula_t fsioFormulas[FSIO_COMMAND_COUNT];
/**
* offset 9872
*/
le_formula_t timingMultiplier;
/**
* offset 10072
*/
le_formula_t timingAdditive;
/**
* offset 10272
*/
float cltFuelCorrBins[CLT_CURVE_SIZE];
/**
* offset 10336
*/
float cltFuelCorr[CLT_CURVE_SIZE];
/**
* offset 10400
*/
float iatFuelCorrBins[IAT_CURVE_SIZE];
/**
* offset 10464
*/
float iatFuelCorr[IAT_CURVE_SIZE];
/**
* offset 10528
*/
float crankingFuelCoef[CRANKING_CURVE_SIZE];
/**
* offset 10560
*/
float crankingFuelBins[CRANKING_CURVE_SIZE];
/**
* offset 10592
*/
float crankingCycleCoef[CRANKING_CURVE_SIZE];
/**
* offset 10624
*/
float crankingCycleBins[CRANKING_CURVE_SIZE];
/**
* CLT-based idle position multiplier for simple manual idle controller
* offset 10656
*/
float cltIdleCorrBins[CLT_CURVE_SIZE];
/**
* CLT-based idle position multiplier for simple manual idle controller
* offset 10720
*/
float cltIdleCorr[CLT_CURVE_SIZE];
/**
* kg/hour value.
* By the way 2.081989116 kg/h = 1 ft<EFBFBD>/m
2018-11-29 21:17:55 -08:00
* offset 10784
*/
float mafDecoding[MAF_DECODING_COUNT];
/**
* offset 11808
*/
float mafDecodingBins[MAF_DECODING_COUNT];
/**
* offset 12832
*/
angle_table_t ignitionIatCorrTable;
/**
* offset 13856
*/
float ignitionIatCorrLoadBins[IGN_LOAD_COUNT];
/**
* offset 13920
*/
float ignitionIatCorrRpmBins[IGN_RPM_COUNT];
/**
* offset 13984
*/
angle_table_t injectionPhase;
/**
* offset 15008
*/
float injPhaseLoadBins[FUEL_LOAD_COUNT];
/**
* offset 15072
*/
float injPhaseRpmBins[FUEL_RPM_COUNT];
/**
* offset 15136
*/
fuel_table_t fuelTable;
/**
* offset 16160
*/
float fuelLoadBins[FUEL_LOAD_COUNT];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 16224
*/
float fuelRpmBins[FUEL_RPM_COUNT];
/**
* offset 16288
*/
ignition_table_t ignitionTable;
/**
* offset 17312
*/
float ignitionLoadBins[IGN_LOAD_COUNT];
/**
* offset 17376
*/
float ignitionRpmBins[IGN_RPM_COUNT];
/**
* offset 17440
*/
ve_table_t veTable;
/**
* offset 18464
*/
float veLoadBins[FUEL_LOAD_COUNT];
/**
* offset 18528
*/
float veRpmBins[FUEL_RPM_COUNT];
/**
* offset 18592
*/
afr_table_t afrTable;
/**
* offset 18848
*/
float afrLoadBins[FUEL_LOAD_COUNT];
/**
* offset 18912
*/
float afrRpmBins[FUEL_RPM_COUNT];
/**
* offset 18976
*/
tps_tps_table_t tpsTpsAccelTable;
/**
* offset 19232
*/
float tpsTpsAccelFromRpmBins[TPS_TPS_ACCEL_TABLE];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 19264
*/
float tpsTpsAccelToRpmBins[TPS_TPS_ACCEL_TABLE];
/**
* offset 19296
*/
fsio_table_8x8_f32t fsioTable1;
/**
* offset 19552
*/
float fsioTable1LoadBins[FSIO_TABLE_8];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 19584
*/
float fsioTable1RpmBins[FSIO_TABLE_8];
/**
* offset 19616
*/
fsio_table_8x8_u8t fsioTable2;
/**
* offset 19680
*/
float fsioTable2LoadBins[FSIO_TABLE_8];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 19712
*/
float fsioTable2RpmBins[FSIO_TABLE_8];
/**
* offset 19744
*/
fsio_table_8x8_u8t fsioTable3;
/**
* offset 19808
*/
float fsioTable3LoadBins[FSIO_TABLE_8];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 19840
*/
float fsioTable3RpmBins[FSIO_TABLE_8];
/**
* offset 19872
*/
fsio_table_8x8_u8t fsioTable4;
/**
* offset 19936
*/
float fsioTable4LoadBins[FSIO_TABLE_8];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 19968
*/
float fsioTable4RpmBins[FSIO_TABLE_8];
/** total size 20000*/
};
typedef struct persistent_config_s persistent_config_s;
2018-11-29 21:17:55 -08:00
#endif
// end
2019-05-27 17:06:01 -07:00
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon May 27 20:05:22 EDT 2019