Skip to content

Commit

Permalink
Stop trying to display double.MaxValue in the Landing AP windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Aug 20, 2020
1 parent 2d222df commit 523cbb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MechJeb2/LandingAutopilot/DecelerationBurn.cs
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using UnityEngine;
using KSP.Localization;
Expand Down Expand Up @@ -72,7 +72,7 @@ public override AutopilotStep OnFixedUpdate()
double desiredAccel = speedError / speedCorrectionTimeConstant + (desiredSpeedAfterDt - desiredSpeed) / vesselState.deltaT;
if (maxAccel - minAccel > 0) core.thrust.targetThrottle = Mathf.Clamp((float)((desiredAccel - minAccel) / (maxAccel - minAccel)), 0.0F, 1.0F);
else core.thrust.targetThrottle = 0;
status = Localizer.Format("#MechJeb_LandingGuidance_Status6", Math.Abs(desiredSpeed).ToString("F1"));//"Braking: target speed = " + + " m/s"
status = Localizer.Format("#MechJeb_LandingGuidance_Status6", (desiredSpeed >= double.MaxValue ? "" : Math.Abs(desiredSpeed).ToString("F1")));//"Braking: target speed = " + + " m/s"
}

core.attitude.attitudeTo(desiredThrustVector, AttitudeReference.INERTIAL, core.landing);
Expand Down

0 comments on commit 523cbb4

Please sign in to comment.