Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c640b09ab156
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0316ed8b6aa0
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 18, 2020

  1. Hide the 2519 debugging UI

    eggrobin committed Apr 18, 2020
    Copy the full SHA
    6d5761a View commit details
  2. Merge pull request #2537 from eggrobin/bring-back-the-toggle

    Hide the 2519 debugging UI
    eggrobin authored Apr 18, 2020
    Copy the full SHA
    0316ed8 View commit details
Showing with 22 additions and 19 deletions.
  1. +22 −19 ksp_plugin_adapter/main_window.cs
41 changes: 22 additions & 19 deletions ksp_plugin_adapter/main_window.cs
Original file line number Diff line number Diff line change
@@ -238,26 +238,28 @@ protected override void RenderWindow(int window_id) {
}

private void RenderKSPFeatures() {
correct_orientation = UnityEngine.GUILayout.Toggle(
correct_orientation,
"Correct orientation");
correct_angular_velocity = UnityEngine.GUILayout.Toggle(
correct_angular_velocity,
"Correct angular velocity");
thresholding = UnityEngine.GUILayout.Toggle(
thresholding,
"Only correct orientation slower than ω");
Interface.SetAngularMomentumConservation(
correct_orientation, correct_angular_velocity, thresholding);
string trace = null;
if (FlightGlobals.ActiveVessel != null &&
plugin.HasVessel(FlightGlobals.ActiveVessel.id.ToString())) {
trace = plugin.VesselGetPileUpTrace(
FlightGlobals.ActiveVessel.id.ToString());
if (show_2519_debugging_ui) {
correct_orientation = UnityEngine.GUILayout.Toggle(
correct_orientation,
"Correct orientation");
correct_angular_velocity = UnityEngine.GUILayout.Toggle(
correct_angular_velocity,
"Correct angular velocity");
thresholding = UnityEngine.GUILayout.Toggle(
thresholding,
"Only correct orientation slower than ω");
Interface.SetAngularMomentumConservation(
correct_orientation, correct_angular_velocity, thresholding);
string trace = null;
if (FlightGlobals.ActiveVessel != null &&
plugin.HasVessel(FlightGlobals.ActiveVessel.id.ToString())) {
trace = plugin.VesselGetPileUpTrace(
FlightGlobals.ActiveVessel.id.ToString());
}
UnityEngine.GUILayout.TextArea(
trace ?? "No managed active vessel",
style : Style.Multiline(UnityEngine.GUI.skin.textArea));
}
UnityEngine.GUILayout.TextArea(
trace ?? "No managed active vessel",
style : Style.Multiline(UnityEngine.GUI.skin.textArea));
display_patched_conics = UnityEngine.GUILayout.Toggle(
value : display_patched_conics,
text : "Display patched conics (do not use for flight planning!)");
@@ -516,6 +518,7 @@ private void RenderToggleableSection(string name,
private static bool correct_orientation = true;
private static bool correct_angular_velocity = true;
private static bool thresholding = true;
private static readonly bool show_2519_debugging_ui = false;

private static readonly double[] prediction_length_tolerances_ =
{1e-3, 1e-2, 1e0, 1e1, 1e2, 1e3, 1e4};