diff --git a/firmware/controllers/can/can_dash.cpp b/firmware/controllers/can/can_dash.cpp index 955f3e6fc7..0f4cc4f3a7 100644 --- a/firmware/controllers/can/can_dash.cpp +++ b/firmware/controllers/can/can_dash.cpp @@ -156,10 +156,13 @@ void canDashboardVAG(void) { void canDashboardW202(void) { + uint16_t tmp; { CanTxMessage msg(W202_STAT_1); + tmp = GET_RPM(); msg[0] = 0x08; // Unknown - msg.setShortValue(GET_RPM(), 1); //RPM + msg[1] = (tmp >> 8); //RPM + msg[2] = (tmp & 0xff); //RPM msg[3] = 0x00; // 0x01 - tank blink, 0x02 - EPC msg[4] = 0x00; // Unknown msg[5] = 0x00; // Unknown @@ -169,7 +172,7 @@ void canDashboardW202(void) { { CanTxMessage msg(W202_STAT_2); //dlc 7 - msg[0] = (int)(Sensor::get(SensorType::Clt).value_or(0) + 40); // CLT - 0x80 ~ 80C + msg[0] = (int)(Sensor::get(SensorType::Clt).value_or(0) + 40); // CLT -40 offset msg[1] = 0x3D; // TBD msg[2] = 0x63; // Const msg[3] = 0x41; // Const diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 1f3db9c027..5c4309a4bd 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -472,7 +472,7 @@ float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 -custom can_nbc_e 4 bits, U32, @OFFSET@, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" can_nbc_e canNbcType;set can_mode X int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index fecd9fd149..43ff01884a 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 19 21:15:09 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 22 15:17:46 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index eeea0fa711..ba7c556b33 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 19 21:15:47 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 22 15:19:07 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index 5b3447a7f4..1c57390ff5 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun Apr 19 21:16:42 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed Apr 22 15:21:06 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 1b2d85429a..a05634f7ba 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 19 21:15:27 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 22 15:18:49 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index c983fb1555..b63f1e0d99 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 19 21:16:06 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 22 15:19:56 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 79f4313d1b..45f632b02b 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 19 21:16:26 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 22 15:20:21 EDT 2020 pageSize = 20000 page = 1 @@ -194,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID"