Fix TPMS readout
This commit is contained in:
parent
0e32024133
commit
7b6e8e3e03
|
@ -28,42 +28,42 @@
|
|||
void OvmsVehicleRenaultZoePh2::IncomingBCM(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
|
||||
switch (pid) {
|
||||
case 0x4204: { // TPMS pressure - front left
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_FL, (float)CAN_UINT(0) * 7.5);
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_FL, (float)CAN_UINT(0) * 7.5 / 10, kPa);
|
||||
ESP_LOGD(TAG, "4204 BCM tpms pressure FL: %f", CAN_UINT(0) * 7.5);
|
||||
break;
|
||||
}
|
||||
case 0x4205: { // TPMS pressure - front right
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_FR, (float)CAN_UINT(0) * 7.5);
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_FR, (float)CAN_UINT(0) * 7.5 / 10, kPa);
|
||||
ESP_LOGD(TAG, "4205 BCM tpms pressure FR: %f", CAN_UINT(0) * 7.5);
|
||||
break;
|
||||
}
|
||||
case 0x4206: { // TPMS pressure - rear left
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_RL, (float)CAN_UINT(0) * 7.5);
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_RL, (float)CAN_UINT(0) * 7.5 / 10, kPa);
|
||||
ESP_LOGD(TAG, "4206 BCM tpms pressure RL: %f", CAN_UINT(0) * 7.5);
|
||||
break;
|
||||
}
|
||||
case 0x4207: { // TPMS pressure - rear right
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_RR, (float)CAN_UINT(0) * 7.5);
|
||||
StandardMetrics.ms_v_tpms_pressure->SetElemValue(MS_V_TPMS_IDX_RR, (float)CAN_UINT(0) * 7.5 / 10, kPa);
|
||||
ESP_LOGD(TAG, "4207 BCM tpms pressure RR: %f", CAN_UINT(0) * 7.5);
|
||||
break;
|
||||
}
|
||||
case 0x420C: { // TPMS temp - front left
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, (float)(CAN_UINT(0) - 30) * 0.001);
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FL, (float)(CAN_UINT(0) - 30) * 0.001, Celcius);
|
||||
ESP_LOGD(TAG, "420C BCM tpms temp FL: %f", (CAN_UINT(0) - 30) * 0.001);
|
||||
break;
|
||||
}
|
||||
case 0x420D: { // TPMS temp - front right
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, (float)(CAN_UINT(0) - 30) * 0.001);
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_FR, (float)(CAN_UINT(0) - 30) * 0.001, Celcius);
|
||||
ESP_LOGD(TAG, "420D BCM tpms temp FR: %f", (CAN_UINT(0) - 30) * 0.001);
|
||||
break;
|
||||
}
|
||||
case 0x420E: { // TPMS temp - rear left
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, (float)(CAN_UINT(0) - 30) * 0.001);
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RL, (float)(CAN_UINT(0) - 30) * 0.001, Celcius);
|
||||
ESP_LOGD(TAG, "420E BCM tpms temp RL: %f", (CAN_UINT(0) - 30) * 0.001);
|
||||
break;
|
||||
}
|
||||
case 0x420F: { // TPMS temp - rear right
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, (float)(CAN_UINT(0) - 30) * 0.001);
|
||||
StandardMetrics.ms_v_tpms_temp->SetElemValue(MS_V_TPMS_IDX_RR, (float)(CAN_UINT(0) - 30) * 0.001, Celcius);
|
||||
ESP_LOGD(TAG, "420F BCM tpms temp RR: %f", (CAN_UINT(0) - 30) * 0.001);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ void OvmsVehicleRenaultZoePh2::IncomingFrameCan1(CAN_frame_t* p_frame) {
|
|||
StandardMetrics.ms_v_pos_speed->SetValue( 0 );
|
||||
StandardMetrics.ms_v_bat_12v_current->SetValue( 0 );
|
||||
StandardMetrics.ms_v_charge_12v_current->SetValue( 0 );
|
||||
StandardMetrics.ms_v_bat_current->SetValue( 0 );
|
||||
POLLSTATE_OFF;
|
||||
}
|
||||
//There are some free frames on wakeup and start and stop charging.... I try to use them to see if Car is awake and charging, see /Reference/ZOE_Ph2_xxx text files
|
||||
|
|
Loading…
Reference in New Issue