Exemple #1
0
        public override void Setup(InputConfig config)
        {
            droneMovement.translateSpeed = 2;
            droneMovement.rotateSpeed    = 270;

            player = config.Player;

            GamePadState padState = GamePad.GetState(player);

            Plugin.Log(string.Format("XInput controller is {0}.", padState.IsConnected ? "connected" : "disconnected"));
        }
Exemple #2
0
        // Start is called before the first frame update
        public override void Setup(InputConfig config)
        {
            startTime = Time.unscaledTime + 1;
            try
            {
                serialPort = new SerialPort(config.comPort, 115200, Parity.None, 8);

                serialPort.Open();
                serialPort.Write(initData, 0, initData.Length);
                Console.WriteLine("[CineCam (DJIInput)] Hello DJI Controller!");
                serialPort.Write(pingData, 0, pingData.Length);
            }
            catch (Exception exc)
            {
                Console.WriteLine("{0}: {1}", exc.GetType().ToString(), exc.Message);
                Console.WriteLine(exc.StackTrace);
            }
        }
Exemple #3
0
 public abstract void Setup(InputConfig config);