From 9d9c3c266ddad9186261710b3f300aab46fe3a78 Mon Sep 17 00:00:00 2001 From: Brenton Hewitt Date: Tue, 2 Feb 2021 22:15:28 +0800 Subject: [PATCH] Gm map sensors (#2265) * GM 2 and 1 Bar Map Sensors * GM MAP Sensor Selection Options --- firmware/controllers/algo/rusefi_enums.h | 4 ++++ firmware/controllers/sensors/map.cpp | 10 ++++++++++ firmware/integration/rusefi_config.txt | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 1586b6bcc3..95199485bf 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -832,6 +832,10 @@ typedef enum { MT_MAZDA_1_BAR = 11, + MT_GM_2_BAR = 12, + + MT_GM_1_BAR = 13, + 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 95c0a060dc..cc509556e4 100644 --- a/firmware/controllers/sensors/map.cpp +++ b/firmware/controllers/sensors/map.cpp @@ -54,6 +54,10 @@ static FastInterpolation subyDenso(0, 0, 5, 200); static FastInterpolation gm3bar(0.631, 40, 4.914, 304); +static FastInterpolation gm2bar(0, 8.8, 5, 208); + +static FastInterpolation gm1bar(0, 10, 5, 105); + static FastInterpolation mpx4250(0, 8, 5, 260); static FastInterpolation mpx4250A(0.25, 20, 4.875, 250); @@ -102,6 +106,8 @@ float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DEC case MT_DODGE_NEON_2003: case MT_SUBY_DENSO: case MT_GM_3_BAR: + case MT_GM_2_BAR: + case MT_GM_1_BAR: case MT_TOYOTA_89420_02010: case MT_MPX4100: case MT_BOSCH_2_5: @@ -205,6 +211,10 @@ static FastInterpolation *getDecoder(air_pressure_sensor_type_e type) { return &subyDenso; case MT_GM_3_BAR: return &gm3bar; + case MT_GM_2_BAR: + return &gm2bar; + case MT_GM_1_BAR: + return &gm1bar; case MT_TOYOTA_89420_02010: return &densoToyota; case MT_MAZDA_1_BAR: diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 290e2b7016..c138140361 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -346,7 +346,7 @@ struct gppwm_channel gppwm_table_t table; end_struct -custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3], "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "type12", "type13", "INVALID", "INVALID" +custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3], "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "Mazda1Bar", "GM 2 Bar", "GM 1 Bar", "INVALID", "INVALID" ! ! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress