diff options
| author | JacobPalecki <[email protected]> | 2021-01-20 20:13:33 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-20 20:13:33 -0800 |
| commit | 5b6479013c8f35df933dd57c680063f4db1e4028 (patch) | |
| tree | 60dd7c67a0f163457da2519b42553382a39a591b /grapher/Models/Charts/ChartState/CombinedState.cs | |
| parent | show custom dialog on bad input (#63) (diff) | |
| parent | Guard against bad anisotropy args (diff) | |
| download | rawaccel-5b6479013c8f35df933dd57c680063f4db1e4028.tar.xz rawaccel-5b6479013c8f35df933dd57c680063f4db1e4028.zip | |
Merge pull request #65 from JacobPalecki/Directional
Directionality Features + Graph Fidelity
Diffstat (limited to 'grapher/Models/Charts/ChartState/CombinedState.cs')
| -rw-r--r-- | grapher/Models/Charts/ChartState/CombinedState.cs | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index 9eadb87..3511cec 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.Calculations.Data; using grapher.Models.Serialized; namespace grapher.Models.Charts.ChartState @@ -9,15 +10,16 @@ namespace grapher.Models.Charts.ChartState ChartXY sensitivityChart, ChartXY velocityChart, ChartXY gainChart, - AccelData accelData, + EstimatedPoints points, AccelCalculator accelCalculator) : base( sensitivityChart, velocityChart, gainChart, - accelData, accelCalculator) - { } + { + Data = new AccelDataCombined(points, accelCalculator); + } public override void Activate() { @@ -30,23 +32,13 @@ namespace grapher.Models.Charts.ChartState GainChart.ClearSecondDots(); } - public override void MakeDots(double x, double y, double timeInMs) - { - Data.CalculateDots(x, y, timeInMs); - } - public override void Bind() { - SensitivityChart.Bind(Data.Combined.AccelPoints); - VelocityChart.Bind(Data.Combined.VelocityPoints); - GainChart.Bind(Data.Combined.GainPoints); - SensitivityChart.SetMinMax(Data.Combined.MinAccel, Data.Combined.MaxAccel); - GainChart.SetMinMax(Data.Combined.MinGain, Data.Combined.MaxGain); - } - - public override void Calculate(ManagedAccel accel, DriverSettings settings) - { - Calculator.Calculate(Data.Combined, accel, settings.sensitivity.x, Calculator.SimulatedInputCombined); + SensitivityChart.Bind(Data.X.AccelPoints); + VelocityChart.Bind(Data.X.VelocityPoints); + GainChart.Bind(Data.X.GainPoints); + SensitivityChart.SetMinMax(Data.X.MinAccel, Data.X.MaxAccel); + GainChart.SetMinMax(Data.X.MinGain, Data.X.MaxGain); } } } |