internal void onPositionUpdate(object sender, WebMessageArgs <WebHIDReport> args)
        {
            WebHIDReport hidReport = args.RawMessage;

            //TODO add syncro lock
            if (hidReport.index == this.index)
            {
                __lastHIDReport = hidReport;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Devices the disconnected event handler.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="args">Arguments.</param>
 public void DeviceDisconnectedEventHandler(object sender, WebMessageArgs <string> args)
 {
     if (__Generics.ContainsKey(args.RawMessage))
     {
         string ID   = args.RawMessage;
         string Name = __Generics[ID].Name;
         int    PID  = __Generics[ID].PID;
         this.webHIDBehaviour.Log("Device " + Name + " PID:" + PID + " Removed");
         this.__Generics.Remove(ID);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Devices the connected event handler.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="args">Arguments.</param>
        public void DeviceConnectedEventHandler(object sender, WebMessageArgs <GenericHIDDevice> args)
        {
            // UnityEngine.Debug.Log(args.Message);
            GenericHIDDevice info = args.RawMessage;



            if (!__Generics.ContainsKey(info.ID))
            {
                info.hidInterface = this;

                ResolveDevice(info);
            }
        }
Exemplo n.º 4
0
 public void GamePadEventsSupportHandler(object sender, WebMessageArgs <bool> args)
 {
 }