summaryrefslogtreecommitdiff
path: root/grapher/Models
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-22 15:26:08 -0700
committerJacob Palecki <[email protected]>2020-09-22 15:26:08 -0700
commitf4ff6334df8a3fd66d13082606b69a78fa592237 (patch)
tree6db3b486a4c19ed02d5c4368fd18d29b2abec78d /grapher/Models
parentSave option to show velocity and gain on gui startup (diff)
downloadrawaccel-f4ff6334df8a3fd66d13082606b69a78fa592237.tar.xz
rawaccel-f4ff6334df8a3fd66d13082606b69a78fa592237.zip
Remove sigmoidgain, only allow one instance of grapher to run at a time
Diffstat (limited to 'grapher/Models')
-rw-r--r--grapher/Models/Charts/ChartXY.cs22
-rw-r--r--grapher/Models/Options/AccelTypeOptions.cs3
-rw-r--r--grapher/Models/Serialized/DriverSettings.cs2
3 files changed, 18 insertions, 9 deletions
diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs
index 253804e..c30c993 100644
--- a/grapher/Models/Charts/ChartXY.cs
+++ b/grapher/Models/Charts/ChartXY.cs
@@ -211,16 +211,26 @@ namespace grapher
public void SetMinMax(double min, double max)
{
- ChartX.ChartAreas[0].AxisY.Minimum = min;
- ChartX.ChartAreas[0].AxisY.Maximum = max;
+ if (min < max)
+ {
+ ChartX.ChartAreas[0].AxisY.Minimum = min;
+ ChartX.ChartAreas[0].AxisY.Maximum = max;
+ }
}
public void SetMinMaxXY(double minX, double maxX, double minY, double maxY)
{
- ChartX.ChartAreas[0].AxisY.Minimum = minX;
- ChartX.ChartAreas[0].AxisY.Maximum = maxX;
- ChartY.ChartAreas[0].AxisY.Minimum = minY;
- ChartY.ChartAreas[0].AxisY.Maximum = maxY;
+ if (minX < maxX)
+ {
+ ChartX.ChartAreas[0].AxisY.Minimum = minX;
+ ChartX.ChartAreas[0].AxisY.Maximum = maxX;
+ }
+
+ if (minY < maxY)
+ {
+ ChartY.ChartAreas[0].AxisY.Minimum = minY;
+ ChartY.ChartAreas[0].AxisY.Maximum = maxY;
+ }
}
public void SetCombined()
diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs
index 16029ce..9bd42f5 100644
--- a/grapher/Models/Options/AccelTypeOptions.cs
+++ b/grapher/Models/Options/AccelTypeOptions.cs
@@ -17,10 +17,9 @@ namespace grapher
new LinearLayout(),
new ClassicLayout(),
new NaturalLayout(),
+ new NaturalGainLayout(),
new PowerLayout(),
new LogarithmLayout(),
- new NaturalGainLayout(),
- new SigmoidGainLayout(),
new MotivityLayout(),
new OffLayout()
}.ToDictionary(k => k.Name);
diff --git a/grapher/Models/Serialized/DriverSettings.cs b/grapher/Models/Serialized/DriverSettings.cs
index 119b684..5f9307c 100644
--- a/grapher/Models/Serialized/DriverSettings.cs
+++ b/grapher/Models/Serialized/DriverSettings.cs
@@ -8,7 +8,7 @@ namespace grapher.Models.Serialized
public enum AccelMode
{
- linear, classic, natural, naturalgain, sigmoidgain, power, logarithm, motivity, noaccel
+ linear, classic, natural, naturalgain, power, logarithm, motivity, noaccel
}
#endregion Enumerations