From d2c1bd93981282cb95c752d246dbdb26c52b15b2 Mon Sep 17 00:00:00 2001 From: John Vanderbeck Date: Sun, 18 Jan 2015 16:10:47 -0800 Subject: [PATCH] changed reported reliability to be 100% in case of error --- TestFlightAPI/TestFlightAPI/TestFlightReliability.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/TestFlightAPI/TestFlightAPI/TestFlightReliability.cs b/TestFlightAPI/TestFlightAPI/TestFlightReliability.cs index 8c436f54..aae13ed7 100644 --- a/TestFlightAPI/TestFlightAPI/TestFlightReliability.cs +++ b/TestFlightAPI/TestFlightAPI/TestFlightReliability.cs @@ -49,27 +49,30 @@ public class TestFlightReliabilityBase : PartModule, ITestFlightReliability // !! IMPORTANT: Only ONE Reliability module may return a Base Failure Rate. Additional modules can exist only to supply Momentary rates // If this Reliability module's purpose is to supply Momentary Fialure Rates, then it MUST return 0 when asked for the Base Failure Rate // If it dosn't, then the Base Failure Rate of the part will not be correct. + // + // TODO + // All these 100's need to be changed to 0's once the new system is in place public double GetBaseFailureRateForScope(double flightData, String scope) { Debug.Log(String.Format("TestFlightReliabilityBase: GetBaseFailureRateForScope({0:F2}, {1})", flightData, scope)); if (core == null) { Debug.Log(String.Format("TestFlightReliabilityBase: core is invalid")); - return 0; + return 100; } ReliabilityBodyConfig body = GetConfigForScope(scope); if (body == null) { Debug.Log(String.Format("TestFlightReliabilityBase: No bodyConfig found")); - return 0; + return 100; } FloatCurve curve = body.reliabilityCurve; if (curve == null) { Debug.Log(String.Format("TestFlightReliabilityBase: reliabilityCurve is invalid")); - return 0; + return 100; } double reliability = curve.Evaluate((float)flightData);