/// AddPoints- Jacob Monger /// <summary> /// add points to graphs, done by seperate thread /// </summary> public void AddPoints() { var now = DateTime.Now; Graph1ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph1Value }); Graph2ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph2Value }); Graph3ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph3Value }); Graph4ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph4Value }); //itterativly remove data if required for (int counter = Graph1ChartValues.Count; (int)Properties.Settings.Default.RightInverterSpeedXNofDataPoint < counter; counter--) { Graph1ChartValues.RemoveAt(0); } for (int counter = Graph2ChartValues.Count; (int)Properties.Settings.Default.RightInverterMechanicalPowerXNofDataPoint < counter; counter--) { Graph2ChartValues.RemoveAt(0); } for (int counter = Graph3ChartValues.Count; (int)Properties.Settings.Default.RightInverterAbsolutePhaseCurrentXNofDataPoint < counter; counter--) { Graph3ChartValues.RemoveAt(0); } for (int counter = Graph4ChartValues.Count; (int)Properties.Settings.Default.RightInverterLinkVoltageDCXNofDataPoint < counter; counter--) { Graph4ChartValues.RemoveAt(0); } if (CurrentTab) { ProcessGraphData(now); } }
/// AddPoints- Jacob Monger /// <summary> /// add points to graphs, done by seperate thread /// </summary> public void AddPoints() { var now = DateTime.Now; Graph1ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph1Value }); Graph2ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph2Value }); Graph3ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph3Value }); Graph4ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph4Value }); //itterativly remove data if required for (int counter = Graph1ChartValues.Count; (int)Properties.Settings.Default.KistlerVelXXNofDataPoint < counter; counter--) { Graph1ChartValues.RemoveAt(0); } for (int counter = Graph2ChartValues.Count; (int)Properties.Settings.Default.KistlerVelYXNofDataPoint < counter; counter--) { Graph2ChartValues.RemoveAt(0); } for (int counter = Graph3ChartValues.Count; (int)Properties.Settings.Default.KistlerAcclerationXXNofDataPoint < counter; counter--) { Graph3ChartValues.RemoveAt(0); } for (int counter = Graph4ChartValues.Count; (int)Properties.Settings.Default.KistlerAcclerationYXNofDataPoint < counter; counter--) { Graph4ChartValues.RemoveAt(0); } if (CurrentTab) { ProcessGraphData(now); } }
/// AddPoints- Jacob Monger /// <summary> /// add points to graphs, done by seperate thread /// </summary> public void AddPoints() { var now = DateTime.Now; Graph1ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph1Value }); Graph2ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph2Value }); Graph3ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph3Value }); Graph4ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph4Value }); //itterativly remove data if required for (int counter = Graph1ChartValues.Count; (int)Properties.Settings.Default.RightPCBTempXNofDataPoint < counter; counter--) { Graph1ChartValues.RemoveAt(0); } for (int counter = Graph2ChartValues.Count; (int)Properties.Settings.Default.LeftPCBTempXNofDataPoint < counter; counter--) { Graph2ChartValues.RemoveAt(0); } for (int counter = Graph3ChartValues.Count; (int)Properties.Settings.Default.TotalAverageBatteryTempXNofDataPoint < counter; counter--) { Graph3ChartValues.RemoveAt(0); } for (int counter = Graph4ChartValues.Count; (int)Properties.Settings.Default.GearBoxTempXNofDataPoint < counter; counter--) { Graph4ChartValues.RemoveAt(0); } if (CurrentTab) { ProcessGraphData(now); } }
/// AddPoints- Jacob Monger /// <summary> /// add points to graphs, done by seperate thread /// </summary> public void AddPoints() { var now = DateTime.Now; Graph1ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph1Value }); Graph2ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph2Value }); Graph3ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph3Value }); Graph4ChartValues.Add(new MeasureModel { DateTime = now, Value = Graph4Value }); //iterativly remove points if there are too many for (int counter = Graph1ChartValues.Count; (int)Properties.Settings.Default.ECULeftTorqueDemandXNofDataPoint < counter; counter--) { Graph1ChartValues.RemoveAt(0); } for (int counter = Graph2ChartValues.Count; (int)Properties.Settings.Default.ECURightTorqueDemandXNofDataPoint < counter; counter--) { Graph2ChartValues.RemoveAt(0); } for (int counter = Graph3ChartValues.Count; (int)Properties.Settings.Default.ECUAcclerationDemandXNofDataPoint < counter; counter--) { Graph3ChartValues.RemoveAt(0); } for (int counter = Graph4ChartValues.Count; (int)Properties.Settings.Default.ECUFrontBrakeDemandXNofDataPoint < counter; counter--) { Graph4ChartValues.RemoveAt(0); } if (CurrentTab) { ProcessGraphData(now); } }