Skip to content

Commit e2a09a3

Browse files
authored
Merge pull request #69 from JacobPalecki/FixByComponent
Fix by component
2 parents bcaa675 + 66cf99e commit e2a09a3

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

grapher/Constants/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static class Constants
4444
public const int DropDownLeftSeparation = 10;
4545

4646
/// <summary> Height of sensitivity chart when displayed alone. </summary>
47-
public const int SensitivityChartAloneHeight = 450;
47+
public const int SensitivityChartAloneHeight = 455;
4848

4949
/// <summary> Height of sensitivity chart when displayed alongside Velocity and Gain charts. </summary>
5050
public const int SensitivityChartTogetherHeight = 328;

grapher/Models/AccelGUIFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public static AccelGUI Construct(
381381
range,
382382
wholeCheckBox,
383383
byComponentCheckBox,
384-
245);
384+
260);
385385

386386
var applyOptions = new ApplyOptions(
387387
byComponentXYLock,

grapher/Models/Calculations/AccelCalculator.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ public void Calculate(AccelChartData data, ManagedAccel accel, double starter, I
136136
var ratio = outMagnitude / simulatedInputDatum.velocity;
137137
var slope = inDiff > 0 ? outDiff / inDiff : starter;
138138

139+
if (slope < lastSlope)
140+
{
141+
Console.WriteLine();
142+
}
143+
139144
if (ratio > maxRatio)
140145
{
141146
maxRatio = ratio;
@@ -398,8 +403,8 @@ public ReadOnlyCollection<SimulatedMouseInput> GetSimulatedInputY()
398403
var timeFactor = ceil / i;
399404
mouseInputData.x = 0;
400405
mouseInputData.y = ceil;
401-
mouseInputData.time = MeasurementTime;
402-
mouseInputData.velocity = Velocity(0, i, mouseInputData.time);
406+
mouseInputData.time = MeasurementTime*timeFactor;
407+
mouseInputData.velocity = Velocity(0, ceil, mouseInputData.time);
403408
mouseInputData.angle = Math.PI / 2;
404409
magnitudes.Add(mouseInputData);
405410
}

grapher/Models/Charts/AccelCharts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public AccelCharts(
3131
gainChart,
3232
accelCalculator,
3333
estimated,
34-
estimatedY,
35-
estimatedX);
34+
estimatedX,
35+
estimatedY);
3636

3737
ContainingForm = form;
3838
EnableVelocityAndGain = enableVelocityAndGain;

0 commit comments

Comments
 (0)