Fixing PIDs
This commit is contained in:
parent
85356d65d9
commit
9548b95ee0
1 changed files with 29 additions and 22 deletions
|
@ -49,6 +49,8 @@ static const char *TAG = "v-zoe-ph2";
|
|||
#include "vehicle_renaultzoe_ph2.h"
|
||||
|
||||
#define SESSION_EXTDIAG 0x1003
|
||||
#define SESSION_DEFAULT 0x1001
|
||||
#define SESSION_AfterSales 0x10C0
|
||||
|
||||
// Pollstate 0 - POLLSTATE_OFF - car is off
|
||||
// Pollstate 1 - POLLSTATE_ON - car is on
|
||||
|
@ -57,29 +59,29 @@ static const char *TAG = "v-zoe-ph2";
|
|||
static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
|
||||
//***TX-ID, ***RX-ID, ***SID, ***PID, { Polltime (seconds) for Pollstate 0, 1, 2, 3}, ***CAN BUS Interface, ***FRAMETYPE
|
||||
//LBC
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_EXTDIAG, { 60, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9001, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // SOC
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x91BC, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // SOH
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_DEFAULT, { 60, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9002, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // SOC
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9003, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // SOH
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x9131, { 0, 60, 600, 60 }, 0, ISOTP_EXTFRAME }, // Temp Bat Module 1
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x9021, { 0, 60, 600, 60 }, 0, ISOTP_EXTFRAME }, // Cell Bat Module 1-62
|
||||
{ 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, 0x20B6, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Battery Voltage
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9005, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Battery Voltage
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x900D, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Battery Current
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x91C8, { 0, 10, 10, 10 }, 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, 0x9244, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy discharged kWh
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x9246, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Energy regenerated kWh
|
||||
{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21D9, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Charging State (1: Slow, 2: Fast, 3: Init Charging)
|
||||
//{ 0x18dadbf1, 0x18daf1db, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21D9, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Charging State (1: Slow, 2: Fast, 3: Init Charging)
|
||||
|
||||
//EVC-HCM-VCM
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_EXTDIAG, { 60, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2006, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Odometer
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21DF, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // 12Battery Current
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2005, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // 12Battery Voltage
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21D0, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // DCDC Temperature
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21CB, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // DCDC Activation
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21CF, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Inverter Status
|
||||
{ 0x18daf1da, 0x18dadaf1, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x303D, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // HV Battery Insulation Resistance
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_EXTDIAG, { 60, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2006, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Odometer
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21DF, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // 12Battery Current
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2005, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // 12Battery Voltage
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21D0, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // DCDC Temperature
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21CB, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // DCDC Activation
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21CF, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Inverter Status
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x303D, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // HV Battery Insulation Resistance
|
||||
|
||||
//Motor Inverter
|
||||
{ 0x18dadff1, 0x18daf1df, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_EXTDIAG, { 60, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
|
@ -87,7 +89,7 @@ static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
|
|||
{ 0x18dadff1, 0x18daf1df, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x7010, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Stator Temperature 2
|
||||
|
||||
//Navigation-UCC-ITM
|
||||
{ 0x747, 0x767, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_EXTDIAG, { 60, 60, 60, 60 }, 0, ISOTP_STD }, // OBD Extended Diagnostic Session
|
||||
{ 0x747, 0x767, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_DEFAULT, { 60, 60, 60, 60 }, 0, ISOTP_STD }, // OBD Extended Diagnostic Session
|
||||
{ 0x747, 0x767, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2109, { 0, 10, 10, 10 }, 0, ISOTP_STD }, // Volume Setting (for debug only)
|
||||
POLL_LIST_END
|
||||
};
|
||||
|
@ -344,7 +346,7 @@ 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) {
|
||||
switch (pid) {
|
||||
case 0x20B6: {
|
||||
case 0x9005: {
|
||||
StandardMetrics.ms_v_bat_voltage->SetValue((float) (CAN_UINT(0)));
|
||||
ESP_LOGD(TAG, "20B6 LBC ms_v_bat_voltage: %d", CAN_UINT(0));
|
||||
break;
|
||||
|
@ -354,24 +356,29 @@ void OvmsVehicleRenaultZoePh2::IncomingLBC(uint16_t type, uint16_t pid, const ch
|
|||
ESP_LOGD(TAG, "900D LBC ms_v_bat_current: %d", CAN_UINT(0));
|
||||
break;
|
||||
}
|
||||
case 0x9001: {
|
||||
case 0x9002: {
|
||||
StandardMetrics.ms_v_bat_soc->SetValue((float) (CAN_UINT(0)) * 0.01);
|
||||
ESP_LOGD(TAG, "9001 LBC ms_v_bat_soc: %f", CAN_UINT(0) * 0.01);
|
||||
break;
|
||||
}
|
||||
case 0x91BC: {
|
||||
case 0x9003: {
|
||||
StandardMetrics.ms_v_bat_soh->SetValue((float) (CAN_UINT(0) * 0.01));
|
||||
ESP_LOGD(TAG, "91BC LBC ms_v_bat_soh: %f", CAN_UINT(0) * 0.01);
|
||||
break;
|
||||
}
|
||||
case 0x9243: {
|
||||
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));
|
||||
break;
|
||||
}
|
||||
case 0x9244: {
|
||||
StandardMetrics.ms_v_bat_energy_used->SetValue((float) (CAN_UINT(0)));
|
||||
ESP_LOGD(TAG, "9244 LBC ms_v_bat_energy_used: %d", CAN_UINT(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));
|
||||
break;
|
||||
}
|
||||
case 0x9246: {
|
||||
StandardMetrics.ms_v_bat_energy_recd->SetValue((float) (CAN_UINT(0)));
|
||||
ESP_LOGD(TAG, "9246 LBC ms_v_bat_energy_recd: %d", CAN_UINT(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));
|
||||
break;
|
||||
}
|
||||
case 0x04: {
|
||||
|
@ -458,7 +465,7 @@ void OvmsVehicleRenaultZoePh2::IncomingPEB(uint16_t type, uint16_t pid, const ch
|
|||
*/
|
||||
void OvmsVehicleRenaultZoePh2::IncomingUCC(uint16_t type, uint16_t pid, const char* data, uint16_t len) {
|
||||
switch (pid) {
|
||||
case 0x2109: { // Motor temperature
|
||||
case 0x2109: {
|
||||
mt_navi_volume->SetValue((float(CAN_UINT(0))));
|
||||
ESP_LOGD(TAG, "2109 navigation volume: %d", CAN_UINT(0));
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue