diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 370bf0b799..6e29f5398a 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -117,6 +117,8 @@ case MT_SUBY_DENSO: return "MT_SUBY_DENSO"; case MT_TOYOTA_89420_02010: return "MT_TOYOTA_89420_02010"; +case MT_BOSCH_2_5: + return "MT_BOSCH_2_5"; } return NULL; } diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 658f62907d..7c43d365c7 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -123,6 +123,8 @@ case MT_SUBY_DENSO: return "MT_SUBY_DENSO"; case MT_TOYOTA_89420_02010: return "MT_TOYOTA_89420_02010"; +case MT_BOSCH_2_5: + return "MT_BOSCH_2_5"; } return NULL; } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 0c7954f436..922668a028 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -753,6 +753,14 @@ typedef enum { */ MT_MPX4250A = 9, + + /** + * Bosch 2.5 Bar TMap Map Sensor with IAT + * 20 kPa at 0.40V, 250 kPa at 4.65V + */ + + MT_BOSCH_2_5 = 10, + Force_4_bytes_size_cranking_map_type = ENUM_32_BITS, } air_pressure_sensor_type_e; diff --git a/firmware/controllers/sensors/map.cpp b/firmware/controllers/sensors/map.cpp index 6ae81fbacb..9d7c5fd0df 100644 --- a/firmware/controllers/sensors/map.cpp +++ b/firmware/controllers/sensors/map.cpp @@ -71,6 +71,11 @@ static FastInterpolation dodgeNeon2003(0.4 /* volts */, 15.34 /* kPa */, 4.5 /* static FastInterpolation densoToyota(3.7 - 2 /* volts */, 33.322271 /* kPa */, 3.7 /* volts */ , 100 /* kPa */); +/** + * Bosch 2.5 Bar TMap Map Sensor with IAT + */ +static FastInterpolation bosch2_5(0.4 /* volts */, 20 /* kPa */, 4.65 /* volts */ , 250 /* kPa */); + /** * We hold a reference to current decoder to reduce code branching * to lookup decoder each time we need to decode @@ -94,6 +99,7 @@ float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DEC case MT_GM_3_BAR: case MT_TOYOTA_89420_02010: case MT_MPX4100: + case MT_BOSCH_2_5: return getDecoder(mapConfig->type)->getValue(voltage); default: firmwareError(CUSTOM_ERR_MAP_TYPE, "Unknown MAP type: p %d", mapConfig->type); @@ -195,6 +201,8 @@ static FastInterpolation *getDecoder(air_pressure_sensor_type_e type) { return &gm3bar; case MT_TOYOTA_89420_02010: return &densoToyota; + case MT_BOSCH_2_5: + return &bosch2_5; default: firmwareError(CUSTOM_ERR_MAP_TYPE, "Unknown MAP type: d %d", type); return &customMap; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 63da957597..4fec66af45 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -312,7 +312,7 @@ struct gppwm_channel gppwm_table_t table; end_struct -custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:7] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "INVALID" +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:7] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "type11", "type12", "type13" ! ! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress !