コード例 #1
0
 public void MapControls(Usb.GameControllers.CHProducts.ProPedals.JoystickMSDriver proPedals)
 {
     // Add in the mappings
     Disposables = new List <IDisposable> {
         proPedals.Subscribe(x => ChPedalsXYR.Process(x, this), ex => Logger.LogError($"Exception : {ex}"))
     };
 }
コード例 #2
0
        public void Initialize(string devicePath, bool usingMsDriver)
        {
            if (usingMsDriver)
            {
                var joystick = new Usb.GameControllers.CHProducts.ProPedals.JoystickMSDriver(devicePath, Logger);

                MapControls(joystick);

                joystick.Initialize();
            }
            else
            {
                var joystick = new Usb.GameControllers.CHProducts.ProPedals.Joystick(devicePath, Logger);

                MapControls(joystick);

                joystick.Initialize();
            }
        }