Fix TPMS temperature readings

This commit is contained in:
Carsten Schmiemann 2022-05-21 12:58:49 +02:00
parent e1d8a850b1
commit c1f026933c
1 changed files with 12 additions and 12 deletions

View File

@ -56,31 +56,31 @@ void OvmsVehicleRenaultZoePh2::IncomingBCM(uint16_t type, uint16_t pid, const ch
break;
}
case 0x6310: { // TPMS temp - front left
if (CAN_UINT(0) < 32512) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, ((CAN_NIB(0) * 0.001)), Celcius);
if (CAN_BYTE(0) < 127) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, CAN_BYTE(0) - 30, Celcius);
}
ESP_LOGD(TAG, "6310 BCM tpms temp FL: %d", CAN_NIB(0));
//ESP_LOGD(TAG, "6310 BCM tpms temp FL: %d", CAN_NIB(0));
break;
}
case 0x6311: { // TPMS temp - front right
if (CAN_UINT(0) < 32512) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, ((CAN_NIB(0) * 0.001)), Celcius);
if (CAN_BYTE(0) < 127) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, CAN_BYTE(0) - 30, Celcius);
}
ESP_LOGD(TAG, "6311 BCM tpms temp FR: %d", CAN_NIBL(0));
//ESP_LOGD(TAG, "6311 BCM tpms temp FR: %d", CAN_NIBL(0));
break;
}
case 0x6312: { // TPMS temp - rear left
if (CAN_UINT(0) < 32512) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, ((CAN_NIB(0) * 0.001)), Celcius);
if (CAN_BYTE(0) < 127) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, CAN_BYTE(0) - 30, Celcius);
}
ESP_LOGD(TAG, "6312 BCM tpms temp RL: %d", CAN_NIBH(0));
//ESP_LOGD(TAG, "6312 BCM tpms temp RL: %d", CAN_NIBH(0));
break;
}
case 0x6313: { // TPMS temp - rear right
if (CAN_UINT(0) < 32512) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, ((CAN_NIB(0) * 0.001)), Celcius);
if (CAN_BYTE(0) < 127) {
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, CAN_BYTE(0) - 30, Celcius);
}
ESP_LOGD(TAG, "6313 BCM tpms temp RR: %d", CAN_BYTE(0));
//ESP_LOGD(TAG, "6313 BCM tpms temp RR: %d", CAN_BYTE(0));
break;
}
case 0x4109: { // TPMS alert - front left