Esempio n. 1
0
 public static GhKpController Create(EliteSharedState sharedState, vJoy vjoy, vJoyMapper vJoyMapper)
 {
     return(new GhKpController()
     {
         Controller = Faz.SideWinderSC.Logic.KeypadController.RetrieveAll()?.First(),
         SharedState = sharedState,
         //vJoy = vjoy,
         vJoyMapper = vJoyMapper,
         //VisualState = new VisualState { Name = Name }
     });
 }
 public static TmThrottleController Create(EliteSharedState sharedState, vJoy vjoy, EliteVirtualJoysticks virtualJoysticks,
                                           vJoyMapper vJoyMapper, ArduinoCommunication.Arduino arduino)
 {
     return(new TmThrottleController()
     {
         Controller = Faz.SideWinderSC.Logic.TMWartHogThrottleController.RetrieveAll()?.First(),
         SharedState = sharedState,
         VirtualJoysticks = virtualJoysticks,
         vJoyMapper = vJoyMapper,
         Arduino = arduino
     });
 }
Esempio n. 3
0
 public static ScController Create(EliteSharedState sharedState, vJoy vjoy, vJoyMapper vJoyMapper)
 {
     return(new ScController()
     {
         Controller = SwscController.RetrieveAll()?.First(),
         SharedState = sharedState,
         vJoy = vjoy,
         vJoyMapper = vJoyMapper,
         VisualState = new VisualState {
             Name = Name
         }
     });
 }
Esempio n. 4
0
 public static Swff2Controller Create(EliteSharedState sharedState, vJoy vjoy,
                                      vJoyMapper vJoyMapper, ArduinoCommunication.Arduino arduino)
 {
     return(new Swff2Controller()
     {
         Controller = Faz.SideWinderSC.Logic.Swff2Controller.RetrieveAll()?.First(),
         SharedState = sharedState,
         vJoy = vjoy,
         vJoyMapper = vJoyMapper,
         Arduino = arduino,
         VisualState = new VisualState {
             Name = Name
         }
     });
 }
 public static Swff2Controller Create(EliteSharedState sharedState, vJoy vjoy, EliteVirtualJoysticks virtualJoysticks,
                                      vJoyMapper vJoyMapper, ArduinoCommunication.Arduino arduino)
 {
     try
     {
         return(new Swff2Controller()
         {
             Controller = Faz.SideWinderSC.Logic.Swff2Controller.RetrieveAll().First(),
             SharedState = sharedState,
             //vJoy = vjoy,
             VirtualJoysticks = virtualJoysticks,
             vJoyMapper = vJoyMapper,
             Arduino = arduino,
         });
     }
     catch (InvalidOperationException)
     {
     }
     return(null);
 }
Esempio n. 6
0
 public static ScController Create(
     EliteSharedState sharedState, vJoy vjoy, EliteVirtualJoysticks virtualJoysticks, vJoyMapper vJoyMapper)
 {
     return(new ScController()
     {
         Controller = SwscController.RetrieveAll()?.First(),
         SharedState = sharedState,
         //vJoy = vjoy,
         VirtualJoysticks = virtualJoysticks,
         vJoyMapper = vJoyMapper,
     });
 }
 public static ChPedalsController Create(
     EliteSharedState sharedState, vJoyInterfaceWrap.vJoy vjoy, EliteVirtualJoysticks virtualJoysticks, vJoyMapper vJoyMapper)
 {
     return(new ChPedalsController()
     {
         Controller = Faz.SideWinderSC.Logic.CHPedalsController.RetrieveAll()?.First(),
         SharedState = sharedState,
         //vJoy = vjoy,
         VirtualJoysticks = virtualJoysticks,
         vJoyMapper = vJoyMapper,
     });
 }
Esempio n. 8
0
 public static SwGvController Create(
     EliteSharedState sharedState, vJoy vjoy, EliteVirtualJoysticks virtualJoysticks, vJoyMapper vJoyMapper)
 {
     return(new SwGvController()
     {
         Controller = SwgvController.RetrieveAll()?.First(),
         SharedState = sharedState,
         //vJoy = vjoy,
         VirtualJoysticks = virtualJoysticks,
         vJoyMapper = vJoyMapper,
         //VisualState = new VisualState { Name = Name }
     });
 }
Esempio n. 9
0
 public static ChPedalsController Create(EliteSharedState sharedState, vJoyInterfaceWrap.vJoy vjoy, vJoyMapper vJoyMapper)
 {
     return(new ChPedalsController()
     {
         Controller = Faz.SideWinderSC.Logic.CHPedalsController.RetrieveAll()?.First(),
         SharedState = sharedState,
         vJoy = vjoy,
         vJoyMapper = vJoyMapper,
         VisualState = new VisualState {
             Name = Name
         }
     });
 }
Esempio n. 10
0
        public void TestMethod1()
        {
            try
            {
                List <Controller>     Controllers           = new List <Controller>();
                EliteVirtualJoysticks eliteVirtualJoysticks = new EliteVirtualJoysticks();
                vJoyMapper            vJoyMapper            = new vJoyMapper();
                EliteSharedState      SharedState           = new EliteSharedState {
                    OrbitLines = true, HeadsUpDisplay = true
                };
                ArduinoCommunication.Arduino arduino = null;

                Settings settings = Settings.Load();

                var ffb2 = new vJoyMapping.Microsoft.Sidewinder.ForceFeedback2.Controller
                {
                    Arduino          = arduino,
                    Name             = "Force Feedback 2",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(ffb2);

                var swgv = new vJoyMapping.Microsoft.Sidewinder.GameVoice.Controller
                {
                    Arduino          = arduino,
                    Name             = "Game Voice",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(swgv);

                var swsc = new vJoyMapping.Microsoft.Sidewinder.StrategicCommander.Controller
                {
                    Arduino          = arduino,
                    Name             = "Strategic Commander",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(swsc);

                var warthog = new vJoyMapping.Thrustmaster.Warthog.Throttle.Controller
                {
                    Arduino          = arduino,
                    Name             = "Warthog Throttle",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(warthog);

                var pedals = new vJoyMapping.CHProducts.ProPedals.Controller
                {
                    Arduino          = arduino,
                    Name             = "Pro Pedals",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(pedals);

                var bbi32 = new vJoyMapping.LeoBodnar.BBI32.Controller
                {
                    Arduino          = arduino,
                    Name             = "BBI32",
                    SharedState      = SharedState,
                    Settings         = settings,
                    VirtualJoysticks = eliteVirtualJoysticks
                };

                Controllers.Add(bbi32);

                // State Handlers
                var subscription = SharedState.GearChanged.Subscribe(
                    x => ffb2.CallActivateButton(vJoyTypes.Virtual, MappedButtons.LandingGearToggle, 200));

                while (true)
                {
                    Thread.Sleep(1000);
                }
            }
            catch (Exception)
            {
                ;
            }
        }
Esempio n. 11
0
 public static ButtonBoxController Create(EliteSharedState sharedState, vJoy vjoy, vJoyMapper vJoyMapper, ArduinoCommunication.Arduino arduino)
 {
     return(new ButtonBoxController()
     {
         Controller = BBI32Controller.RetrieveAll()?.First(),
         SharedState = sharedState,
         vJoy = vjoy,
         vJoyMapper = vJoyMapper,
         Arduino = arduino,
         VisualState = new VisualState {
             Name = Name
         }
     });
 }