refactoring - enum has more usages now
This commit is contained in:
parent
7322fc345e
commit
8f68e8e646
|
@ -2928,7 +2928,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1735
|
||||
*/
|
||||
afr_override_e afrOverrideMode;
|
||||
load_override_e afrOverrideMode;
|
||||
/**
|
||||
* offset 1736
|
||||
*/
|
||||
|
@ -3057,7 +3057,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1752
|
||||
*/
|
||||
afr_override_e ignOverrideMode;
|
||||
load_override_e ignOverrideMode;
|
||||
/**
|
||||
* Select which fuel pressure sensor measures the pressure of the fuel at your injectors.
|
||||
* offset 1753
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
#define afr_alignmentFill_afr_offset 569
|
||||
#define afr_hwChannel_offset 568
|
||||
#define afr_offset 568
|
||||
#define afr_override_e_AFR_AccPedal 3
|
||||
#define afr_override_e_AFR_CylFilling 4
|
||||
#define afr_override_e_AFR_MAP 1
|
||||
#define afr_override_e_AFR_None 0
|
||||
#define afr_override_e_AFR_Tps 2
|
||||
#define afr_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define afr_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define load_override_e_AFR_AccPedal 3
|
||||
#define load_override_e_AFR_CylFilling 4
|
||||
#define load_override_e_AFR_MAP 1
|
||||
#define load_override_e_AFR_None 0
|
||||
#define load_override_e_AFR_Tps 2
|
||||
#define load_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define load_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define afr_sensor_s_size 20
|
||||
#define afr_type_offset 700
|
||||
#define afr_v1_offset 572
|
||||
|
|
|
@ -2928,7 +2928,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1735
|
||||
*/
|
||||
afr_override_e afrOverrideMode;
|
||||
load_override_e afrOverrideMode;
|
||||
/**
|
||||
* offset 1736
|
||||
*/
|
||||
|
@ -3057,7 +3057,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1752
|
||||
*/
|
||||
afr_override_e ignOverrideMode;
|
||||
load_override_e ignOverrideMode;
|
||||
/**
|
||||
* Select which fuel pressure sensor measures the pressure of the fuel at your injectors.
|
||||
* offset 1753
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
#define afr_alignmentFill_afr_offset 569
|
||||
#define afr_hwChannel_offset 568
|
||||
#define afr_offset 568
|
||||
#define afr_override_e_AFR_AccPedal 3
|
||||
#define afr_override_e_AFR_CylFilling 4
|
||||
#define afr_override_e_AFR_MAP 1
|
||||
#define afr_override_e_AFR_None 0
|
||||
#define afr_override_e_AFR_Tps 2
|
||||
#define afr_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define afr_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define load_override_e_AFR_AccPedal 3
|
||||
#define load_override_e_AFR_CylFilling 4
|
||||
#define load_override_e_AFR_MAP 1
|
||||
#define load_override_e_AFR_None 0
|
||||
#define load_override_e_AFR_Tps 2
|
||||
#define load_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define load_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define afr_sensor_s_size 20
|
||||
#define afr_type_offset 700
|
||||
#define afr_v1_offset 572
|
||||
|
|
|
@ -2928,7 +2928,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1735
|
||||
*/
|
||||
afr_override_e afrOverrideMode;
|
||||
load_override_e afrOverrideMode;
|
||||
/**
|
||||
* offset 1736
|
||||
*/
|
||||
|
@ -3057,7 +3057,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1752
|
||||
*/
|
||||
afr_override_e ignOverrideMode;
|
||||
load_override_e ignOverrideMode;
|
||||
/**
|
||||
* Select which fuel pressure sensor measures the pressure of the fuel at your injectors.
|
||||
* offset 1753
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
#define afr_alignmentFill_afr_offset 569
|
||||
#define afr_hwChannel_offset 568
|
||||
#define afr_offset 568
|
||||
#define afr_override_e_AFR_AccPedal 3
|
||||
#define afr_override_e_AFR_CylFilling 4
|
||||
#define afr_override_e_AFR_MAP 1
|
||||
#define afr_override_e_AFR_None 0
|
||||
#define afr_override_e_AFR_Tps 2
|
||||
#define afr_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define afr_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define load_override_e_AFR_AccPedal 3
|
||||
#define load_override_e_AFR_CylFilling 4
|
||||
#define load_override_e_AFR_MAP 1
|
||||
#define load_override_e_AFR_None 0
|
||||
#define load_override_e_AFR_Tps 2
|
||||
#define load_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define load_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define afr_sensor_s_size 20
|
||||
#define afr_type_offset 700
|
||||
#define afr_v1_offset 572
|
||||
|
|
|
@ -57,7 +57,7 @@ case Force_4_bytes_size_adc_channel_mode:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getAfr_override_e(afr_override_e value){
|
||||
const char *getload_override_e(load_override_e value){
|
||||
switch(value) {
|
||||
case AFR_AccPedal:
|
||||
return "AFR_AccPedal";
|
||||
|
|
|
@ -9,7 +9,7 @@ const char *getInjectorNonlinearMode(InjectorNonlinearMode value);
|
|||
const char *getPidAutoTune_AutoTunerState(PidAutoTune_AutoTunerState value);
|
||||
const char *getPidAutoTune_Peak(PidAutoTune_Peak value);
|
||||
const char *getAdc_channel_mode_e(adc_channel_mode_e value);
|
||||
const char *getAfr_override_e(afr_override_e value);
|
||||
const char *getload_override_e(load_override_e value);
|
||||
const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value);
|
||||
const char *getAntiLagActivationMode_e(antiLagActivationMode_e value);
|
||||
const char *getBoostType_e(boostType_e value);
|
||||
|
|
|
@ -59,7 +59,7 @@ float FuelComputer::getTargetLambdaLoadAxis(float defaultLoad) const {
|
|||
return getLoadOverride(defaultLoad, engineConfiguration->afrOverrideMode);
|
||||
}
|
||||
|
||||
float getLoadOverride(float defaultLoad, afr_override_e overrideMode) {
|
||||
float getLoadOverride(float defaultLoad, load_override_e overrideMode) {
|
||||
switch(overrideMode) {
|
||||
case AFR_None: return defaultLoad;
|
||||
// MAP default to 200kpa - failed MAP goes rich
|
||||
|
|
|
@ -33,5 +33,5 @@ private:
|
|||
const ValueProvider3D* const m_lambdaTable;
|
||||
};
|
||||
|
||||
float getLoadOverride(float defaultLoad, afr_override_e overrideMode);
|
||||
float getLoadOverride(float defaultLoad, load_override_e overrideMode);
|
||||
constexpr float fuelDensity = 0.72; // g/cc
|
||||
|
|
|
@ -607,7 +607,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
AFR_Tps = 2,
|
||||
AFR_AccPedal = 3,
|
||||
AFR_CylFilling = 4,
|
||||
} afr_override_e;
|
||||
} load_override_e;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
// todo: rename to HB_None?
|
||||
|
|
|
@ -2928,7 +2928,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1735
|
||||
*/
|
||||
afr_override_e afrOverrideMode;
|
||||
load_override_e afrOverrideMode;
|
||||
/**
|
||||
* offset 1736
|
||||
*/
|
||||
|
@ -3057,7 +3057,7 @@ struct engine_configuration_s {
|
|||
* Advanced users only: If you aren't sure you need this, you probably don't need this.
|
||||
* offset 1752
|
||||
*/
|
||||
afr_override_e ignOverrideMode;
|
||||
load_override_e ignOverrideMode;
|
||||
/**
|
||||
* Select which fuel pressure sensor measures the pressure of the fuel at your injectors.
|
||||
* offset 1753
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
#define afr_alignmentFill_afr_offset 569
|
||||
#define afr_hwChannel_offset 568
|
||||
#define afr_offset 568
|
||||
#define afr_override_e_AFR_AccPedal 3
|
||||
#define afr_override_e_AFR_CylFilling 4
|
||||
#define afr_override_e_AFR_MAP 1
|
||||
#define afr_override_e_AFR_None 0
|
||||
#define afr_override_e_AFR_Tps 2
|
||||
#define afr_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define afr_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define load_override_e_AFR_AccPedal 3
|
||||
#define load_override_e_AFR_CylFilling 4
|
||||
#define load_override_e_AFR_MAP 1
|
||||
#define load_override_e_AFR_None 0
|
||||
#define load_override_e_AFR_Tps 2
|
||||
#define load_override_e_auto_enum "AFR_None", "AFR_MAP", "AFR_Tps", "AFR_AccPedal", "AFR_CylFilling"
|
||||
#define load_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
#define afr_sensor_s_size 20
|
||||
#define afr_type_offset 700
|
||||
#define afr_v1_offset 572
|
||||
|
|
|
@ -1196,9 +1196,9 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\
|
|||
|
||||
can_baudrate_e can2BaudRate;
|
||||
|
||||
#define afr_override_e_enum "None", "MAP", "TPS", "Acc Pedal", "Cyl Filling %"
|
||||
custom afr_override_e 1 bits, U08, @OFFSET@, [0:2], @@afr_override_e_enum@@
|
||||
afr_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.
|
||||
#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.
|
||||
|
||||
uint32_t unused1736;;"", 1, 0, 0, 536870911, 0
|
||||
bit unused1740b0
|
||||
|
@ -1214,7 +1214,7 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\
|
|||
brain_pin_e can2RxPin;set_can2_rx_pin X
|
||||
pin_output_mode_e starterControlPinMode;
|
||||
adc_channel_e wastegatePositionSensor;
|
||||
afr_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.
|
||||
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"
|
||||
|
|
Loading…
Reference in New Issue