Add metrics for using BMS as trip energy counter

This commit is contained in:
Carsten Schmiemann 2022-04-20 21:46:05 +02:00
parent 5b510f7c50
commit ede1e57238
2 changed files with 5 additions and 1 deletions

View File

@ -66,10 +66,12 @@ OvmsVehicleRenaultZoePh2::OvmsVehicleRenaultZoePh2() {
PollSetThrottling(10);
PollSetResponseSeparationTime(20);
// Init custom Zoe Ph2 metrics:
// Renault ZOE specific metrics
mt_bus_awake = MyMetrics.InitBool("zph2.v.bus.awake", SM_STALE_NONE, false);
mt_pos_odometer_start = MyMetrics.InitFloat("zph2.v.pos.odometer.start", SM_STALE_MID, 0, Kilometers);
mt_pos_car_trip = MyMetrics.InitFloat("zph2.v.pos.car.trip", SM_STALE_NONE, 0, Kilometers);
mt_bat_used_start = MyMetrics.InitFloat("zph2.b.used.start", SM_STALE_MID, 0, Kilometers);
mt_bat_recd_start = MyMetrics.InitFloat("zph2.b.recd.start", SM_STALE_MID, 0, Kilometers);
mt_bat_available_energy = MyMetrics.InitFloat("zph2.b.avail.energy", SM_STALE_NONE, 0, kWh);
mt_bat_aux_power_consumer = MyMetrics.InitFloat("zph2.b.aux.power.consumer", SM_STALE_MID, 0, Watts);
mt_bat_aux_power_ptc = MyMetrics.InitFloat("zph2.b.aux.power.ptc", SM_STALE_MID, 0, Watts);

View File

@ -97,6 +97,8 @@ class OvmsVehicleRenaultZoePh2 : public OvmsVehicle {
OvmsMetricBool *mt_bus_awake; //CAN bus awake status
OvmsMetricFloat *mt_pos_odometer_start; //ODOmeter at trip start
OvmsMetricFloat *mt_pos_car_trip; //Cluster tripcounter
OvmsMetricFloat *mt_bat_used_start; //Used battery kWh at trip start
OvmsMetricFloat *mt_bat_recd_start; //Recd battery kWh at trip start
OvmsMetricFloat *mt_bat_available_energy; //Available energy in battery
OvmsMetricFloat *mt_bat_aux_power_consumer; //Power usage by consumer
OvmsMetricFloat *mt_bat_aux_power_ptc; //Power usage by PTCs