Change cable plug behavior
This commit is contained in:
parent
749fe7d79a
commit
937ea9c3ae
|
@ -88,11 +88,17 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch
|
|||
//ESP_LOGD(TAG, "2B85 EVC Charge plug present: %d", CAN_NIBL(0));
|
||||
if (CAN_NIBL(0) == 1) {
|
||||
StandardMetrics.ms_v_charge_pilot->SetValue(true);
|
||||
ESP_LOGD(TAG, "Charge cable plugged in");
|
||||
if (!CarPluggedIn) {
|
||||
ESP_LOGI(TAG, "Charge cable plugged in");
|
||||
CarPluggedIn = true;
|
||||
}
|
||||
}
|
||||
if (CAN_NIBL(0) == 0) {
|
||||
StandardMetrics.ms_v_charge_pilot->SetValue(false);
|
||||
ESP_LOGD(TAG, "Charge cable plugged out");
|
||||
if (CarPluggedIn) {
|
||||
ESP_LOGI(TAG, "Charge cable plugged out");
|
||||
CarPluggedIn = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
|
|||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2218, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Ambient Temperature
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2A09, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Power usage by consumer
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2191, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Power usage by ptc
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2B85, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Charge plug preset
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2B6D, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Charge MMI states
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2B85, { 0, 2, 300, 10 }, 0, ISOTP_EXTFRAME }, // Charge plug preset
|
||||
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2B6D, { 0, 2, 300, 10 }, 0, ISOTP_EXTFRAME }, // Charge MMI states
|
||||
|
||||
//BCM
|
||||
{ 0x1861, 0x1893, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_DEFAULT, { 0, 60, 60, 60 }, 0, ISOTP_EXTFRAME }, // OBD Extended Diagnostic Session
|
||||
|
|
|
@ -71,6 +71,7 @@ class OvmsVehicleRenaultZoePh2 : public OvmsVehicle {
|
|||
void WebDeInit();
|
||||
bool CarIsDriving = false;
|
||||
bool CarIsCharging = false;
|
||||
bool CarPluggedIn = false;
|
||||
|
||||
protected:
|
||||
void IncomingINV(uint16_t type, uint16_t pid, const char* data, uint16_t len);
|
||||
|
|
Loading…
Reference in New Issue