mirror of
https://github.com/RawAccelOfficial/rawaccel.git
synced 2025-05-15 22:04:45 +02:00
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using grapher.Models.Calculations;
|
|
using grapher.Models.Calculations.Data;
|
|
using grapher.Models.Serialized;
|
|
|
|
namespace grapher.Models.Charts.ChartState
|
|
{
|
|
public class CombinedState : ChartState
|
|
{
|
|
public CombinedState(
|
|
ChartXY sensitivityChart,
|
|
ChartXY velocityChart,
|
|
ChartXY gainChart,
|
|
EstimatedPoints points,
|
|
AccelCalculator accelCalculator)
|
|
: base(
|
|
sensitivityChart,
|
|
velocityChart,
|
|
gainChart,
|
|
accelCalculator)
|
|
{
|
|
Data = new AccelDataCombined(points, accelCalculator);
|
|
}
|
|
|
|
public override void Activate()
|
|
{
|
|
SensitivityChart.SetCombined();
|
|
VelocityChart.SetCombined();
|
|
GainChart.SetCombined();
|
|
|
|
SensitivityChart.ClearSecondDots();
|
|
VelocityChart.ClearSecondDots();
|
|
GainChart.ClearSecondDots();
|
|
}
|
|
|
|
public override void Bind()
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|