Next steps (#4120)

* Technical debt: ENUM_32_BITS #3874

* Technical debt: ENUM_32_BITS #3874

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2022-05-01 15:02:51 +03:00 committed by GitHub
parent 8c8fb2d6da
commit 05f8d4600b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 26 deletions

View File

@ -179,7 +179,7 @@ typedef enum {
Force_4_bytes_size_log_format = ENUM_32_BITS,
} log_format_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
/**
* In auto mode we currently have some pid-like-but-not really PID logic which is trying
* to get idle RPM to desired value by dynamically adjusting idle valve position.
@ -191,7 +191,7 @@ typedef enum {
* which could be adjusted according to current CLT
*/
IM_MANUAL = 1,
Force_4_bytes_size_idle_mode = ENUM_32_BITS,
} idle_mode_e;
typedef enum __attribute__ ((__packed__)) {
@ -251,7 +251,6 @@ typedef enum {
*/
FOUR_STROKE_THREE_TIMES_CRANK_SENSOR = 5,
Force_4_bytes_size_operation_mode_e = ENUM_32_BITS,
} operation_mode_e;
/**
@ -370,7 +369,7 @@ typedef enum __attribute__ ((__packed__)) {
IMU_TYPE_MB_A0065422618 = 5,
} imu_type_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
ES_BPSX_D1 = 0,
/**
* same as innovate LC2
@ -392,10 +391,9 @@ typedef enum {
ES_AEM = 6,
Force_4_bytes_size_ego_sensor = ENUM_32_BITS,
} ego_sensor_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
MT_CUSTOM = 0,
MT_DENSO183 = 1,
/**
@ -457,10 +455,10 @@ typedef enum {
*/
MT_MPXH6400 = 14,
Force_4_bytes_size_cranking_map_type = ENUM_32_BITS,
} air_pressure_sensor_type_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
SC_OFF = 0,
/**
* You would use this value if you want to see a detailed graph of your trigger events
@ -471,7 +469,6 @@ typedef enum {
SC_DETAILED_RPM = 4,
SC_AUX_FAST1 = 5,
Internal_ForceMyEnumIntSize_sensor_chart = ENUM_32_BITS,
} sensor_chart_e;
typedef enum {
@ -484,15 +481,15 @@ typedef enum {
} gear_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
CUSTOM = 0,
Bosch0280218037 = 1,
Bosch0280218004 = 2,
DensoTODO = 3,
Internal_ForceMyEnumIntSize_maf_sensor = ENUM_32_BITS,
} maf_sensor_type_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
/**
* This is the default mode in which ECU controls timing dynamically
*/
@ -503,14 +500,12 @@ typedef enum {
*/
TM_FIXED = 1,
Internal_ForceMyEnumIntSize_timing_mode = ENUM_32_BITS,
} timing_mode_e;
/**
* Net Body Computer types
*/
typedef enum {
typedef enum __attribute__ ((__packed__)) {
CAN_BUS_NBC_NONE = 0,
CAN_BUS_NBC_FIAT = 1,
CAN_BUS_NBC_VAG = 2,
@ -525,14 +520,13 @@ typedef enum {
CAN_BUS_HONDA_K = 11,
CAN_AIM_DASH = 12,
Internal_ForceMyEnumIntSize_can_nbc = ENUM_32_BITS,
} can_nbc_e;
typedef enum {
typedef enum __attribute__ ((__packed__)) {
TCHARGE_MODE_RPM_TPS = 0,
TCHARGE_MODE_AIR_INTERP = 1,
TCHARGE_MODE_AIR_INTERP_TABLE = 2,
Force_4bytes_size_tChargeMode_e = ENUM_32_BITS,
} tChargeMode_e;
// peak type

View File

@ -301,7 +301,7 @@ struct pid_s
end_struct
#define ego_sensor_e_enum "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom", "INVALID", "INVALID"
custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@
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
@ -374,7 +374,7 @@ struct gppwm_channel
uint8_t[GPPWM_RPM_COUNT x GPPWM_LOAD_COUNT] table;;"duty", 1, 0, 0, 100, 0
end_struct
custom air_pressure_sensor_type_e 4 bits, U32, @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"
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
@ -546,7 +546,7 @@ int8_t gapTrackingLengthOverride;How many consecutive gap rations have to match
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 4 bits, U32, @OFFSET@, [0:0], "dynamic", "fixed"
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
@ -563,7 +563,7 @@ float fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;
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 4 bits, U32, @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"
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
@ -886,12 +886,12 @@ custom script_setting_t 4 scalar, F32, @OFFSET@, "", 1, 0, 0, 18000, 2
#define sensor_chart_e_enum "none", "trigger", "INVALID", "RPM ACCEL", "DETAILED RPM", "Fast Aux1"
custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@
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 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@
custom maf_sensor_type_e 1 bits, S08, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@@
maf_sensor_type_e mafSensorType;
@ -1052,7 +1052,7 @@ bit skippedWheelOnCam,"On camshaft","On crankshaft";+Where is your primary skipp
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 4 bits, U32, @OFFSET@, [0:0], "Open Loop + Closed Loop", "Open Loop"
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.
@ -1402,7 +1402,7 @@ float tChargeAirIncrLimit;Maximum allowed rate of increase allowed for the estim
float tChargeAirDecrLimit;Maximum allowed rate of decrease allowed for the estimated charge temperature;"deg/sec", 1, 0, 0, 100, 1
#define tChargeMode_e_enum "RPM+TPS (Default)", "Air Mass Interpolation", "Table"
custom tChargeMode_e 4 bits, U32, @OFFSET@, [0:1], @@tChargeMode_e_enum@@
custom tChargeMode_e 1 bits, U08, @OFFSET@, [0:1], @@tChargeMode_e_enum@@
tChargeMode_e tChargeMode;
float[ETB_BIAS_CURVE_LENGTH] etbBiasBins;target TPS value, 0 to 100%\nTODO: use int8 data date once we template interpolation method;"target TPS position", 1, 0, 0, 100, 0