Add ambient air pressure

This commit is contained in:
Carsten Schmiemann 2022-04-20 23:26:00 +02:00
parent a7d3c42791
commit 6195129baa
4 changed files with 10 additions and 2 deletions

View File

@ -208,6 +208,11 @@ void OvmsVehicleRenaultZoePh2::IncomingEVC(uint16_t type, uint16_t pid, const ch
//ESP_LOGD(TAG, "2B8A EVC ms_v_charge_voltage: %f", (CAN_UINT(0) * 0.5));
break;
}
case 0x2009: { // Ambient air pressure
mt_v_env_pressure->SetValue((float) (CAN_UINT(0)));
ESP_LOGD(TAG, "2009 EVC mt_v_env_pressure: %d mbar", CAN_UINT(0));
break;
}
default: {
char *buf = NULL;

View File

@ -49,7 +49,7 @@ static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2005, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // 12Battery Voltage
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x21CF, { 0, 2, 10, 300 }, 0, ISOTP_EXTFRAME }, // Inverter Status
//{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x303D, { 0, 10, 10, 3 }, 0, ISOTP_EXTFRAME }, // HV Battery Insulation Resistance
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2218, { 0, 10, 10, 10 }, 0, ISOTP_EXTFRAME }, // Ambient Temperature
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2218, { 0, 20, 20, 20 }, 0, ISOTP_EXTFRAME }, // Ambient air 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, 2, 300, 10 }, 0, ISOTP_EXTFRAME }, // Charge plug preset
@ -60,6 +60,7 @@ static const OvmsVehicle::poll_pid_t renault_zoe_polls[] = {
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x300D, { 0, 10, 300, 3 }, 0, ISOTP_EXTFRAME }, // AC mains current
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x300B, { 0, 2, 300, 10 }, 0, ISOTP_EXTFRAME }, // AC phases
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2B8A, { 0, 2, 300, 10 }, 0, ISOTP_EXTFRAME }, // AC mains voltage
{ 0x18dadaf1, 0x18daf1da, VEHICLE_POLL_TYPE_OBDIIEXTENDED, 0x2009, { 0, 20, 20, 20 }, 0, ISOTP_EXTFRAME }, // Ambient air pressure
//BCM
//{ 0x745, 0x765, VEHICLE_POLL_TYPE_OBDIISESSION, SESSION_DEFAULT, { 0, 60, 60, 60 }, 0, ISOTP_STD }, // OBD Extended Diagnostic Session

View File

@ -88,7 +88,8 @@ OvmsVehicleRenaultZoePh2::OvmsVehicleRenaultZoePh2() {
mt_hvac_compressor_pressure = MyMetrics.InitFloat("zph2.h.compressor.pressure", SM_STALE_MID, 0);
mt_hvac_compressor_power = MyMetrics.InitFloat("zph2.h.compressor.power", SM_STALE_MID, 0, Watts);
mt_hvac_compressor_mode = MyMetrics.InitString("zph2.h.compressor.mode", SM_STALE_MID, 0);
mt_v_env_pressure = MyMetrics.InitFloat("zph2.v.e.pressure", SM_STALE_MIN, 0);
// BMS configuration:
BmsSetCellArrangementVoltage(96, 1);
BmsSetCellArrangementTemperature(12, 1);

View File

@ -117,6 +117,7 @@ class OvmsVehicleRenaultZoePh2 : public OvmsVehicle {
OvmsMetricFloat *mt_hvac_compressor_pressure;//Compressor high-side pressure in BAR
OvmsMetricFloat *mt_hvac_compressor_power; //Compressor power usage
OvmsMetricString *mt_hvac_compressor_mode; //Compressor mode
OvmsMetricFloat *mt_v_env_pressure; //Ambient air pressure
protected: