Technical debt: ENUM_32_BITS #3874

one step back
This commit is contained in:
Andrey 2022-05-02 04:38:04 -04:00
parent 063cc702f2
commit beee828b6f
2 changed files with 8 additions and 4 deletions

View File

@ -231,7 +231,9 @@ typedef enum __attribute__ ((__packed__)) {
TEST_101 = 101,
TEST_102 = 102,
Force_2_bytes_size_engine_type = 60000,
// java code generator handles this value in a special way
// also looks like 2 enums are either 1 byte or 4 bytes
Force_4_bytes_size_engine_type = 70000,
} engine_type_e;
/**
@ -525,7 +527,9 @@ typedef enum {
//
TT_UNUSED = 74, // this is used if we want to iterate over all trigger types
Force_2_bytes_size_trigger_type = 60000,
// java code generator handles this value in a special way
// also looks like 2 enums are either 1 byte or 4 bytes
Force_4_bytes_size_trigger_type = 70000,
} trigger_type_e; // TriggerProcessor.java has this "trigger_type_e" name hard-coded!

View File

@ -422,7 +422,7 @@ struct ThermistorConf @brief Thermistor curve parameters
adc_channel_e adcChannel;
end_struct
custom engine_type_e 2 bits, S16, @OFFSET@, [0:6], @@engine_type_e_auto_enum@@
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
@ -586,7 +586,7 @@ 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 2 bits, U16, @OFFSET@, [0:6], @@trigger_type_e_enum@@
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