diff --git a/OVMS.V3/components/ovms_server_v3/src/ovms_server_v3.cpp b/OVMS.V3/components/ovms_server_v3/src/ovms_server_v3.cpp index 0570607..1f685eb 100644 --- a/OVMS.V3/components/ovms_server_v3/src/ovms_server_v3.cpp +++ b/OVMS.V3/components/ovms_server_v3/src/ovms_server_v3.cpp @@ -758,26 +758,16 @@ void OvmsServerV3::MetricModified(OvmsMetric* metric) return; //metric->ClearModified(MyOvmsServerV3Modifier); - //Set important metrics to modified and clear, to transmit them while streaming - StandardMetrics.ms_v_pos_latitude->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_longitude->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_direction->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_altitude->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_gpslock->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_gpssq->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_gpsmode->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_gpshdop->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_satcount->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_gpsspeed->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_pos_speed->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_env_drivemode->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_bat_power->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_bat_energy_used->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_bat_energy_recd->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_inv_power->IsModifiedAndClear(MyOvmsServerV3Modifier); - StandardMetrics.ms_v_inv_efficiency->IsModifiedAndClear(MyOvmsServerV3Modifier); - - TransmitMetric(metric); + while (metric != NULL) + { + if (metric->IsModifiedAndClear(MyOvmsServerV3Modifier)) + { + TransmitMetric(metric); + ESP_LOGD(TAG, "metric: %s", (char*)metric); + } + metric = metric->m_next; + } + //TransmitMetric(metric); m_lasttx_stream = now; } }