From 05c7094a93c7d29eb8ac05247110995574a7b963 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Wed, 16 Sep 2020 01:20:23 -0700 Subject: Unsure if I will use this --- grapher/Models/Charts/ChartState/CombinedState.cs | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 grapher/Models/Charts/ChartState/CombinedState.cs (limited to 'grapher/Models/Charts/ChartState/CombinedState.cs') diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs new file mode 100644 index 0000000..bc8c720 --- /dev/null +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -0,0 +1,38 @@ +using grapher.Models.Calculations; + +namespace grapher.Models.Charts.ChartState +{ + public class CombinedState : ChartState + { + public CombinedState( + ChartXY sensitivityChart, + ChartXY velocityChart, + ChartXY gainChart, + AccelData accelData) + : base( + sensitivityChart, + velocityChart, + gainChart, + accelData) + { } + + public override void Activate() + { + SensitivityChart.SetCombined(); + VelocityChart.SetCombined(); + GainChart.SetCombined(); + } + + public override void MakeDots(int x, int y, double timeInMs) + { + AccelData.CalculateDots(x, y, timeInMs); + } + + public override void Bind() + { + SensitivityChart.Bind(AccelData.Combined.AccelPoints); + VelocityChart.Bind(AccelData.Combined.VelocityPoints); + GainChart.Bind(AccelData.Combined.GainPoints); + } + } +} -- cgit v1.2.3 From df173decac3ac5e1043b53961f1512bb88b85136 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 17 Sep 2020 20:26:15 -0700 Subject: Further work --- grapher/Models/Charts/ChartState/CombinedState.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'grapher/Models/Charts/ChartState/CombinedState.cs') diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index bc8c720..d229a43 100644 --- a/grapher/Models/Charts/ChartState/CombinedState.cs +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -8,12 +8,14 @@ namespace grapher.Models.Charts.ChartState ChartXY sensitivityChart, ChartXY velocityChart, ChartXY gainChart, - AccelData accelData) + AccelData accelData, + AccelCalculator accelCalculator) : base( sensitivityChart, velocityChart, gainChart, - accelData) + accelData, + accelCalculator) { } public override void Activate() @@ -25,14 +27,14 @@ namespace grapher.Models.Charts.ChartState public override void MakeDots(int x, int y, double timeInMs) { - AccelData.CalculateDots(x, y, timeInMs); + Data.CalculateDots(x, y, timeInMs); } public override void Bind() { - SensitivityChart.Bind(AccelData.Combined.AccelPoints); - VelocityChart.Bind(AccelData.Combined.VelocityPoints); - GainChart.Bind(AccelData.Combined.GainPoints); + SensitivityChart.Bind(Data.Combined.AccelPoints); + VelocityChart.Bind(Data.Combined.VelocityPoints); + GainChart.Bind(Data.Combined.GainPoints); } } } -- cgit v1.2.3 From 1dd0c108b8948c50fd8f2b9c9055dbb8e7d47270 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 17 Sep 2020 23:51:47 -0700 Subject: Add y lines to graphes + further work --- grapher/Models/Charts/ChartState/CombinedState.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'grapher/Models/Charts/ChartState/CombinedState.cs') diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index d229a43..c788775 100644 --- a/grapher/Models/Charts/ChartState/CombinedState.cs +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -1,4 +1,5 @@ using grapher.Models.Calculations; +using grapher.Models.Serialized; namespace grapher.Models.Charts.ChartState { @@ -36,5 +37,10 @@ namespace grapher.Models.Charts.ChartState VelocityChart.Bind(Data.Combined.VelocityPoints); GainChart.Bind(Data.Combined.GainPoints); } + + public override void Calculate(ManagedAccel accel, DriverSettings settings) + { + Calculator.Calculate(Data.Combined, accel, settings.sensitivity.x, Calculator.MagnitudesCombined, true, settings); + } } } -- cgit v1.2.3 From 8f5c6c2a733812b19641789e34552afe9e601686 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sat, 19 Sep 2020 19:27:37 -0700 Subject: further work --- grapher/Models/Charts/ChartState/CombinedState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grapher/Models/Charts/ChartState/CombinedState.cs') diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index c788775..17cd68a 100644 --- a/grapher/Models/Charts/ChartState/CombinedState.cs +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -40,7 +40,7 @@ namespace grapher.Models.Charts.ChartState public override void Calculate(ManagedAccel accel, DriverSettings settings) { - Calculator.Calculate(Data.Combined, accel, settings.sensitivity.x, Calculator.MagnitudesCombined, true, settings); + Calculator.Calculate(Data.Combined, accel, settings.sensitivity.x, Calculator.MagnitudesCombined); } } } -- cgit v1.2.3