diff --git a/firmware/controllers/algo/auto_generated_commonenum.cpp b/firmware/controllers/algo/auto_generated_commonenum.cpp index b3306b0a6d..35e94cf2d3 100644 --- a/firmware/controllers/algo/auto_generated_commonenum.cpp +++ b/firmware/controllers/algo/auto_generated_commonenum.cpp @@ -1,6 +1,6 @@ #include "global.h" #include "rusefi_enums.h" -// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Mon Sep 27 22:25:31 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Sep 30 15:15:34 EDT 2021 // see also gen_config_and_enums.bat @@ -357,6 +357,21 @@ case Force_4_bytes_size_ego_sensor: } return NULL; } +const char *getEmu_type_e(emu_type_e value){ +switch(value) { +case IMU_NONE: + return "IMU_NONE"; +case IMU_TYPE_2: + return "IMU_TYPE_2"; +case IMU_TYPE_3: + return "IMU_TYPE_3"; +case IMU_TYPE_4: + return "IMU_TYPE_4"; +case IMU_VAG: + return "IMU_VAG"; + } + return NULL; +} const char *getEngine_load_mode_e(engine_load_mode_e value){ switch(value) { case Force_4_bytes_size_engine_load_mode: diff --git a/firmware/controllers/algo/auto_generated_commonenum.h b/firmware/controllers/algo/auto_generated_commonenum.h index 884b42b945..abae058618 100644 --- a/firmware/controllers/algo/auto_generated_commonenum.h +++ b/firmware/controllers/algo/auto_generated_commonenum.h @@ -1,4 +1,4 @@ -// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Mon Jul 12 21:01:09 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Sep 30 15:15:34 EDT 2021 // see also gen_config_and_enums.bat @@ -21,6 +21,7 @@ const char *getCranking_ignition_mode_e(cranking_ignition_mode_e value); const char *getDebug_mode_e(debug_mode_e value); const char *getDisplay_mode_e(display_mode_e value); const char *getEgo_sensor_e(ego_sensor_e value); +const char *getEmu_type_e(emu_type_e value); const char *getEngine_load_mode_e(engine_load_mode_e value); const char *getEngine_type_e(engine_type_e value); const char *getEtb_function_e(etb_function_e value); diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 1147370848..92895e74c4 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -744,6 +744,15 @@ typedef enum { Force_4_bytes_size_can_vss_nbc_e = ENUM_32_BITS, } can_vss_nbc_e; +// inertia measurement unit, yawn accelerometer +typedef enum __attribute__ ((__packed__)) { + IMU_NONE = 0, + IMU_VAG = 1, + IMU_TYPE_2 = 2, + IMU_TYPE_3 = 3, + IMU_TYPE_4 = 4, +} emu_type_e; + typedef enum { ES_BPSX_D1 = 0, /** diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 0fac429f7d..60209f7bde 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -921,7 +921,10 @@ output_pin_e acFanPin;+Optional Radiator Fan used with A/C pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; uint8_t[DWELL_CURVE_SIZE] dwellVoltageCorrVoltBins;;"volts", 0.1, 0, 0, 20, 1 - uint8_t[2] unusedpinModesWhereHere;;"", 1, 0, 0, 255, 0 + custom imu_type_e 1 bits, U08, @OFFSET@, [0:4], "None", "VAG", "type 2", "type 2", "type 2" + imu_type_e imuType + + uint8_t[1] unusedpinModesWhereHere;;"", 1, 0, 0, 255, 0 output_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments uint8_t[DWELL_CURVE_SIZE] dwellVoltageCorrValues;;"multiplier", 0.02, 0, 0, 5, 2 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 46017d6deb..18e6c56adb 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -3029,6 +3029,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" field = "CAN write enabled", canWriteEnabled field = "CAN bitrate", canBaudRate field = "CAN dash type", canNbcType + field = "inertia measurement unit", imuType field = "Enable rusEFI CAN broadcast", enableVerboseCanTx field = "rusEFI CAN data base address", verboseCanBaseAddress field = "rusEFI CAN data period", canSleepPeriodMs