public void RCSBalancerInfoItem()
        {
            GUILayout.BeginVertical();
            GuiUtils.SimpleLabel("Calculation time", (solverThread.calculationTime * 1000).ToString("F0") + " ms");
            GuiUtils.SimpleLabelInt("Pending tasks", solverThread.taskCount);

            GuiUtils.SimpleLabelInt("Cache size", solverThread.cacheSize);
            GuiUtils.SimpleLabelInt("Cache hits", solverThread.cacheHits);
            GuiUtils.SimpleLabelInt("Cache misses", solverThread.cacheMisses);

            GuiUtils.SimpleLabel("CoM shift", MuUtils.ToSI(solverThread.comError) + "m");
            GuiUtils.SimpleLabel("CoM recalc", MuUtils.ToSI(solverThread.comErrorThreshold) + "m");
            GuiUtils.SimpleLabel("Max CoM shift", MuUtils.ToSI(solverThread.maxComError) + "m");

            GuiUtils.SimpleLabel("Status", solverThread.statusString);

            string error = solverThread.errorString;

            if (!string.IsNullOrEmpty(error))
            {
                GUILayout.Label(error, GUILayout.ExpandWidth(true));
            }

            GUILayout.EndVertical();
        }
示例#2
0
        [GeneralInfoItem("#MechJeb_RCSBalancerInfo", InfoItem.Category.Thrust)]//RCS balancer info
        public void RCSBalancerInfoItem()
        {
            GUILayout.BeginVertical();
            GuiUtils.SimpleLabel(Localizer.Format("#MechJeb_RCSBalancerInfo_Label1"), (solverThread.calculationTime * 1000).ToString("F0") + " ms"); //"Calculation time"
            GuiUtils.SimpleLabelInt(Localizer.Format("#MechJeb_RCSBalancerInfo_Label2"), solverThread.taskCount);                                    //"Pending tasks"

            GuiUtils.SimpleLabelInt(Localizer.Format("#MechJeb_RCSBalancerInfo_Label3"), solverThread.cacheSize);                                    //"Cache size"
            GuiUtils.SimpleLabelInt(Localizer.Format("#MechJeb_RCSBalancerInfo_Label4"), solverThread.cacheHits);                                    //"Cache hits"
            GuiUtils.SimpleLabelInt(Localizer.Format("#MechJeb_RCSBalancerInfo_Label5"), solverThread.cacheMisses);                                  //"Cache misses"

            GuiUtils.SimpleLabel(Localizer.Format("#MechJeb_RCSBalancerInfo_Label6"), MuUtils.ToSI(solverThread.comError) + "m");                    //"CoM shift"
            GuiUtils.SimpleLabel(Localizer.Format("#MechJeb_RCSBalancerInfo_Label7"), MuUtils.ToSI(solverThread.comErrorThreshold) + "m");           //"CoM recalc"
            GuiUtils.SimpleLabel(Localizer.Format("#MechJeb_RCSBalancerInfo_Label8"), MuUtils.ToSI(solverThread.maxComError) + "m");                 //"Max CoM shift"

            GuiUtils.SimpleLabel(Localizer.Format("#MechJeb_RCSBalancerInfo_Label9"), solverThread.statusString);                                    //"Status"

            string error = solverThread.errorString;

            if (!string.IsNullOrEmpty(error))
            {
                GUILayout.Label(error, GUILayout.ExpandWidth(true));
            }

            GUILayout.EndVertical();
        }