diff --git a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/BCM_pids.cpp b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/BCM_pids.cpp index ca7cdb7..f2651d3 100644 --- a/OVMS.V3/components/vehicle_renaultzoe_ph2/src/BCM_pids.cpp +++ b/OVMS.V3/components/vehicle_renaultzoe_ph2/src/BCM_pids.cpp @@ -57,28 +57,28 @@ void OvmsVehicleRenaultZoePh2::IncomingBCM(uint16_t type, uint16_t pid, const ch } case 0x6310: { // TPMS temp - front left if (CAN_UINT(0) < 32512) { - StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, fabs((CAN_UINT(0) * 0.001) - 30.0f), Celcius); + StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, (30.0f - (CAN_UINT(0) * 0.001)), Celcius); } //ESP_LOGD(TAG, "6310 BCM tpms temp FL: %f", fabs((CAN_UINT(0) * 0.001) - 30.0f)); break; } case 0x6311: { // TPMS temp - front right if (CAN_UINT(0) < 32512) { - StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, fabs((CAN_UINT(0) * 0.001) - 30.0f), Celcius); + StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, (30.0f - (CAN_UINT(0) * 0.001)), Celcius); } //ESP_LOGD(TAG, "6311 BCM tpms temp FR: %f", fabs((CAN_UINT(0) * 0.001) - 30.0f)); break; } case 0x6312: { // TPMS temp - rear left if (CAN_UINT(0) < 32512) { - StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, fabs((CAN_UINT(0) * 0.001) - 30.0f), Celcius); + StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, (30.0f - (CAN_UINT(0) * 0.001)), Celcius); } //ESP_LOGD(TAG, "6312 BCM tpms temp RL: %f", fabs((CAN_UINT(0) * 0.001) - 30.0f)); break; } case 0x6313: { // TPMS temp - rear right if (CAN_UINT(0) < 32512) { - StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, fabs((CAN_UINT(0) * 0.001) - 30.0f), Celcius); + StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, (30.0f - (CAN_UINT(0) * 0.001)), Celcius); } //ESP_LOGD(TAG, "6313 BCM tpms temp RR: %f", fabs((CAN_UINT(0) * 0.001) - 30.0f)); break;