private bool controllerVisible(AsstController controller)
 {
     if (!controller.bShow)
         return false;
     switch (controller.ctrlID)
     {
         case AsstList.HdgBank:
         case AsstList.BankToYaw:
             return bShowHdg && CurrentHrztMode != HrztMode.Bank;
         case AsstList.Aileron:
         case AsstList.Rudder:
             return bShowHdg && showControlSurfaces;
         case AsstList.Altitude:
             return bShowVert && (CurrentVertMode == VertMode.Altitude || CurrentVertMode == VertMode.RadarAltitude);
         case AsstList.VertSpeed:
             return bShowVert;
         case AsstList.Elevator:
             return bShowVert && showControlSurfaces;
         case AsstList.Speed:
             return bShowThrottle && CurrentThrottleMode == ThrottleMode.Speed;
         case AsstList.Acceleration:
             return bShowThrottle && CurrentThrottleMode != ThrottleMode.Direct;
         default:
             return true;
     }
 }
        public static void newAsstPreset(ref string name, AsstController[] controllers, Vessel v)
        {
            if (string.IsNullOrEmpty(name))
                return;

            string tempName = name;
            if (Instance.AsstPresetList.Any(p => p.name == tempName))
            {
                GeneralUI.postMessage("Failed to add preset with duplicate name");
                return;
            }
            AsstPreset newPreset = new AsstPreset(controllers, name);
            updateCraftPreset(newPreset, v);
            Instance.AsstPresetList.Add(newPreset);
            Instance.activeAsstPreset = PresetManager.Instance.AsstPresetList.Last();
            saveToFile();
            name = "";
        }