Add battery average temperature
This commit is contained in:
parent
0387bf2d6f
commit
67b8238b29
1 changed files with 13 additions and 7 deletions
|
@ -67,6 +67,7 @@ static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x9062, { 0, 60, 600, 60 }, 0, ISOTP_EXTFRAME }, // Cell Bat Module 63-96
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x9062, { 0, 60, 600, 60 }, 0, ISOTP_EXTFRAME }, // Cell Bat Module 63-96
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9005, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Voltage
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9005, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Voltage
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x925D, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Current
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x925D, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Current
|
||||||
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9012, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Average Temperature
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x91C8, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Available Energy kWh
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x91C8, { 0, 10, 3, 5 }, 0, ISOTP_EXTFRAME }, // Battery Available Energy kWh
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9243, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy charged kWh
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9243, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy charged kWh
|
||||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9244, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy discharged kWh
|
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9244, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy discharged kWh
|
||||||
|
@ -361,38 +362,43 @@ void OvmsVehicleRenaultZoePh2::IncomingBCB(uint16_t type, uint16_t pid, const ch
|
||||||
*/
|
*/
|
||||||
void OvmsVehicleRenaultZoePh2::IncomingLBC(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
|
void OvmsVehicleRenaultZoePh2::IncomingLBC(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
case 0x9005: {
|
case 0x9005: { //Battery voltage
|
||||||
StandardMetrics.ms_v_bat_voltage->SetValue((float) (CAN_UINT(0) * 0.1));
|
StandardMetrics.ms_v_bat_voltage->SetValue((float) (CAN_UINT(0) * 0.1));
|
||||||
ESP_LOGD(TAG, "9005 LBC ms_v_bat_voltage: %f", CAN_UINT(0) * 0.1);
|
ESP_LOGD(TAG, "9005 LBC ms_v_bat_voltage: %f", CAN_UINT(0) * 0.1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x925D: {
|
case 0x925D: { //Battery current
|
||||||
StandardMetrics.ms_v_bat_current->SetValue((float) ((CAN_UINT(0) - 1020) * 0.03125));
|
StandardMetrics.ms_v_bat_current->SetValue((float) ((CAN_UINT(0) - 1020) * 0.03125));
|
||||||
ESP_LOGD(TAG, "925D LBC ms_v_bat_current: %d", CAN_UINT(0));
|
ESP_LOGD(TAG, "925D LBC ms_v_bat_current: %d", CAN_UINT(0));
|
||||||
ESP_LOGD(TAG, "925D LBC ms_v_bat_current: %f", ((CAN_UINT(0) - 1020) * 0.03125));
|
ESP_LOGD(TAG, "925D LBC ms_v_bat_current: %f", ((CAN_UINT(0) - 1020) * 0.03125));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x9002: {
|
case 0x9012: { //Battery average temperature
|
||||||
|
StandardMetrics.ms_v_bat_temp->SetValue((float) ((CAN_UINT(0) - 40));
|
||||||
|
ESP_LOGD(TAG, "9012 LBC ms_v_bat_temp: %f", ((CAN_UINT(0) - 40));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 0x9002: { //Battery SOC
|
||||||
StandardMetrics.ms_v_bat_soc->SetValue((float) (CAN_UINT(0)) * 0.01);
|
StandardMetrics.ms_v_bat_soc->SetValue((float) (CAN_UINT(0)) * 0.01);
|
||||||
ESP_LOGD(TAG, "9002 LBC ms_v_bat_soc: %f", CAN_UINT(0) * 0.01);
|
ESP_LOGD(TAG, "9002 LBC ms_v_bat_soc: %f", CAN_UINT(0) * 0.01);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x9003: {
|
case 0x9003: { //Battery SOH
|
||||||
StandardMetrics.ms_v_bat_soh->SetValue((float) (CAN_UINT(0) * 0.01));
|
StandardMetrics.ms_v_bat_soh->SetValue((float) (CAN_UINT(0) * 0.01));
|
||||||
ESP_LOGD(TAG, "9003 LBC ms_v_bat_soh: %f", CAN_UINT(0) * 0.01);
|
ESP_LOGD(TAG, "9003 LBC ms_v_bat_soh: %f", CAN_UINT(0) * 0.01);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x9243: {
|
case 0x9243: { //Battery energy charged kWh
|
||||||
StandardMetrics.ms_v_charge_kwh_grid_total->SetValue((float) (CAN_UINT24(0)));
|
StandardMetrics.ms_v_charge_kwh_grid_total->SetValue((float) (CAN_UINT24(0)));
|
||||||
ESP_LOGD(TAG, "9243 LBC ms_v_charge_kwh_grid_total: %d", CAN_UINT24(0));
|
ESP_LOGD(TAG, "9243 LBC ms_v_charge_kwh_grid_total: %d", CAN_UINT24(0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x9244: {
|
case 0x9244: { //Battery energy discharged kWh
|
||||||
StandardMetrics.ms_v_bat_energy_used->SetValue((float) (CAN_UINT24(0)));
|
StandardMetrics.ms_v_bat_energy_used->SetValue((float) (CAN_UINT24(0)));
|
||||||
ESP_LOGD(TAG, "9244 LBC ms_v_bat_energy_used: %d", CAN_UINT24(0));
|
ESP_LOGD(TAG, "9244 LBC ms_v_bat_energy_used: %d", CAN_UINT24(0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x9246: {
|
case 0x9246: { //Battery energy regenerated kWh
|
||||||
StandardMetrics.ms_v_bat_energy_recd->SetValue((float) (CAN_UINT24(0)));
|
StandardMetrics.ms_v_bat_energy_recd->SetValue((float) (CAN_UINT24(0)));
|
||||||
ESP_LOGD(TAG, "9246 LBC ms_v_bat_energy_recd: %d", CAN_UINT24(0));
|
ESP_LOGD(TAG, "9246 LBC ms_v_bat_energy_recd: %d", CAN_UINT24(0));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue