can_dash fix for w202 + TS enum (#1346)

This commit is contained in:
shadowm60 2020-04-22 21:24:38 +03:00 committed by GitHub
parent 638cb64b54
commit bb6aa1d82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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