Exemple #1
0
        public override Boolean Start()
        {
            if (IsActive)
            {
                Array.Copy(m_Local, 0, m_ReportArgs.Report, (Int32)DsOffset.Address, m_Local.Length);

                m_ReportArgs.Report[(Int32)DsOffset.Connection] = (Byte)Connection;
                m_ReportArgs.Report[(Int32)DsOffset.Model]      = (Byte)Model;

                m_State  = DsState.Connected;
                m_Packet = 0;

                HID_Worker.RunWorkerAsync();
                tmUpdate.Enabled = true;

                Rumble(0, 0);
                LogDebug(String.Format("-- Started Device Instance [{0}] Local [{1}] Remote [{2}]", m_Instance, Local, Remote));
            }

            return(State == DsState.Connected);
        }
        public override Boolean Start()
        {
            if (IsActive)
            {
                Int32 Transfered = 0;

                if (SendTransfer(0x21, 0x09, 0x03F4, m_Enable, ref Transfered))
                {
                    m_State  = DeviceState.Connected;
                    m_Packet = 0;

                    HID_Worker.RunWorkerAsync();

                    LogDebug(String.Format("-- Started Device Instance [{0}]", m_Instance));
                }
            }

            m_Timer.Change(16, 16);

            return(State == DeviceState.Connected);
        }